.class public final synthetic Lz5/an0;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lz5/cu;


# instance fields
.field public final synthetic r:I

.field public final s:Lz5/dn0;

.field public final t:Landroid/view/WindowManager;

.field public final u:Landroid/view/View;


# direct methods
.method public constructor <init>(Lz5/dn0;Landroid/view/View;Landroid/view/WindowManager;)V
    .registers 5

    const/4 v0, 0x1

    iput v0, p0, Lz5/an0;->r:I

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lz5/an0;->s:Lz5/dn0;

    iput-object p2, p0, Lz5/an0;->u:Landroid/view/View;

    iput-object p3, p0, Lz5/an0;->t:Landroid/view/WindowManager;

    return-void
.end method

.method public constructor <init>(Lz5/dn0;Landroid/view/WindowManager;Landroid/view/View;)V
    .registers 5

    const/4 v0, 0x0

    iput v0, p0, Lz5/an0;->r:I

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lz5/an0;->s:Lz5/dn0;

    iput-object p2, p0, Lz5/an0;->t:Landroid/view/WindowManager;

    iput-object p3, p0, Lz5/an0;->u:Landroid/view/View;

    return-void
.end method


# virtual methods
.method public final a(Ljava/lang/Object;Ljava/util/Map;)V
    .registers 14

    iget v0, p0, Lz5/an0;->r:I

    packed-switch v0, :pswitch_data_15c

    goto :goto_49

    .line 1
    :pswitch_6
    iget-object p2, p0, Lz5/an0;->s:Lz5/dn0;

    iget-object v0, p0, Lz5/an0;->t:Landroid/view/WindowManager;

    iget-object v1, p0, Lz5/an0;->u:Landroid/view/View;

    check-cast p1, Lcom/google/android/gms/internal/ads/g2;

    invoke-static {p2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const-string v2, "Hide native ad policy validator overlay."

    .line 2
    invoke-static {v2}, Lz5/d50;->zzd(Ljava/lang/String;)V

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzH()Landroid/view/View;

    move-result-object v2

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzH()Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/View;->getWindowToken()Landroid/os/IBinder;

    move-result-object v2

    if-eqz v2, :cond_30

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzH()Landroid/view/View;

    move-result-object v2

    invoke-interface {v0, v2}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V

    :cond_30
    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->destroy()V

    invoke-virtual {v1}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object p1

    iget-object v0, p2, Lz5/dn0;->c:Landroid/view/ViewTreeObserver$OnScrollChangedListener;

    if-eqz v0, :cond_48

    if-eqz p1, :cond_48

    invoke-virtual {p1}, Landroid/view/ViewTreeObserver;->isAlive()Z

    move-result v0

    if-eqz v0, :cond_48

    iget-object p2, p2, Lz5/dn0;->c:Landroid/view/ViewTreeObserver$OnScrollChangedListener;

    invoke-virtual {p1, p2}, Landroid/view/ViewTreeObserver;->removeOnScrollChangedListener(Landroid/view/ViewTreeObserver$OnScrollChangedListener;)V

    :cond_48
    return-void

    .line 3
    :goto_49
    iget-object v0, p0, Lz5/an0;->s:Lz5/dn0;

    iget-object v8, p0, Lz5/an0;->u:Landroid/view/View;

    iget-object v7, p0, Lz5/an0;->t:Landroid/view/WindowManager;

    check-cast p1, Lcom/google/android/gms/internal/ads/g2;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 4
    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->l()Lz5/z80;

    move-result-object v1

    new-instance v2, Landroidx/appcompat/widget/n;

    invoke-direct {v2, v0, p2}, Landroidx/appcompat/widget/n;-><init>(Lz5/dn0;Ljava/util/Map;)V

    check-cast v1, Lcom/google/android/gms/internal/ads/h2;

    .line 5
    iput-object v2, v1, Lcom/google/android/gms/internal/ads/h2;->x:Lz5/x80;

    if-nez p2, :cond_65

    goto/16 :goto_15b

    .line 6
    :cond_65
    invoke-virtual {v8}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "validator_width"

    invoke-interface {p2, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    sget-object v3, Lz5/so;->g5:Lz5/no;

    .line 7
    sget-object v4, Lz5/xk;->d:Lz5/xk;

    iget-object v5, v4, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 8
    invoke-virtual {v5, v3}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Integer;

    invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I

    move-result v3

    invoke-static {v1, v2, v3}, Lz5/dn0;->b(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v2

    const-string v3, "validator_height"

    invoke-interface {p2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    sget-object v5, Lz5/so;->h5:Lz5/no;

    .line 9
    iget-object v6, v4, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 10
    invoke-virtual {v6, v5}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Integer;

    invoke-virtual {v5}, Ljava/lang/Integer;->intValue()I

    move-result v5

    invoke-static {v1, v3, v5}, Lz5/dn0;->b(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v3

    const-string v5, "validator_x"

    invoke-interface {p2, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    const/4 v6, 0x0

    invoke-static {v1, v5, v6}, Lz5/dn0;->b(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v5

    const-string v9, "validator_y"

    invoke-interface {p2, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/lang/String;

    invoke-static {v1, v9, v6}, Lz5/dn0;->b(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v1

    invoke-static {v2, v3}, Lz5/he;->c(II)Lz5/he;

    move-result-object v2

    invoke-interface {p1, v2}, Lcom/google/android/gms/internal/ads/g2;->I(Lz5/he;)V

    :try_start_bf
    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzG()Landroid/webkit/WebView;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    sget-object v3, Lz5/so;->i5:Lz5/no;

    .line 11
    iget-object v6, v4, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 12
    invoke-virtual {v6, v3}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Boolean;

    invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v3

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setUseWideViewPort(Z)V

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzG()Landroid/webkit/WebView;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    sget-object v3, Lz5/so;->j5:Lz5/no;

    .line 13
    iget-object v4, v4, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 14
    invoke-virtual {v4, v3}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Boolean;

    invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v3

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setLoadWithOverviewMode(Z)V
    :try_end_f1
    .catch Ljava/lang/NullPointerException; {:try_start_bf .. :try_end_f1} :catch_f1

    :catch_f1
    invoke-static {}, Lcom/google/android/gms/ads/internal/util/zzca;->zzj()Landroid/view/WindowManager$LayoutParams;

    move-result-object v6

    iput v5, v6, Landroid/view/WindowManager$LayoutParams;->x:I

    iput v1, v6, Landroid/view/WindowManager$LayoutParams;->y:I

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzH()Landroid/view/View;

    move-result-object v2

    invoke-interface {v7, v2, v6}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    const-string v2, "orientation"

    invoke-interface {p2, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    move-object v4, v2

    check-cast v4, Ljava/lang/String;

    new-instance v2, Landroid/graphics/Rect;

    invoke-direct {v2}, Landroid/graphics/Rect;-><init>()V

    invoke-virtual {v8, v2}, Landroid/view/View;->getGlobalVisibleRect(Landroid/graphics/Rect;)Z

    move-result v3

    if-nez v3, :cond_115

    goto :goto_14a

    :cond_115
    const-string v3, "1"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_129

    const-string v3, "2"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_126

    goto :goto_129

    :cond_126
    iget v2, v2, Landroid/graphics/Rect;->top:I

    goto :goto_12b

    :cond_129
    :goto_129
    iget v2, v2, Landroid/graphics/Rect;->bottom:I

    :goto_12b
    sub-int v9, v2, v1

    new-instance v10, Lz5/cn0;

    move-object v1, v10

    move-object v2, v8

    move-object v3, p1

    move-object v5, v6

    move v6, v9

    invoke-direct/range {v1 .. v7}, Lz5/cn0;-><init>(Landroid/view/View;Lcom/google/android/gms/internal/ads/g2;Ljava/lang/String;Landroid/view/WindowManager$LayoutParams;ILandroid/view/WindowManager;)V

    iput-object v10, v0, Lz5/dn0;->c:Landroid/view/ViewTreeObserver$OnScrollChangedListener;

    invoke-virtual {v8}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v1

    if-eqz v1, :cond_14a

    invoke-virtual {v1}, Landroid/view/ViewTreeObserver;->isAlive()Z

    move-result v2

    if-eqz v2, :cond_14a

    iget-object v0, v0, Lz5/dn0;->c:Landroid/view/ViewTreeObserver$OnScrollChangedListener;

    invoke-virtual {v1, v0}, Landroid/view/ViewTreeObserver;->addOnScrollChangedListener(Landroid/view/ViewTreeObserver$OnScrollChangedListener;)V

    :cond_14a
    :goto_14a
    const-string v0, "overlay_url"

    invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Ljava/lang/String;

    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_15b

    invoke-interface {p1, p2}, Lcom/google/android/gms/internal/ads/g2;->loadUrl(Ljava/lang/String;)V

    :cond_15b
    :goto_15b
    return-void

    :pswitch_data_15c
    .packed-switch 0x0
        :pswitch_6
    .end packed-switch
.end method
