.class public final Lz5/rz;
.super Landroidx/appcompat/widget/n;
.source ""

# interfaces
.implements Lz5/cu;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroidx/appcompat/widget/n;",
        "Lz5/cu<",
        "Lcom/google/android/gms/internal/ads/g2;",
        ">;"
    }
.end annotation


# instance fields
.field public A:I

.field public B:I

.field public C:I

.field public D:I

.field public E:I

.field public F:I

.field public G:I

.field public final u:Lcom/google/android/gms/internal/ads/g2;

.field public final v:Landroid/content/Context;

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

.field public final x:Lz5/ho;

.field public y:Landroid/util/DisplayMetrics;

.field public z:F


# direct methods
.method public constructor <init>(Lcom/google/android/gms/internal/ads/g2;Landroid/content/Context;Lz5/ho;)V
    .registers 5

    const-string v0, ""

    invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/n;-><init>(Lcom/google/android/gms/internal/ads/g2;Ljava/lang/String;)V

    const/4 v0, -0x1

    iput v0, p0, Lz5/rz;->A:I

    iput v0, p0, Lz5/rz;->B:I

    iput v0, p0, Lz5/rz;->D:I

    iput v0, p0, Lz5/rz;->E:I

    iput v0, p0, Lz5/rz;->F:I

    iput v0, p0, Lz5/rz;->G:I

    iput-object p1, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    iput-object p2, p0, Lz5/rz;->v:Landroid/content/Context;

    iput-object p3, p0, Lz5/rz;->x:Lz5/ho;

    const-string p1, "window"

    invoke-virtual {p2, p1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/view/WindowManager;

    iput-object p1, p0, Lz5/rz;->w:Landroid/view/WindowManager;

    return-void
.end method


# virtual methods
.method public final D(II)V
    .registers 9

    iget-object v0, p0, Lz5/rz;->v:Landroid/content/Context;

    instance-of v0, v0, Landroid/app/Activity;

    const/4 v1, 0x0

    if-eqz v0, :cond_15

    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzc()Lcom/google/android/gms/ads/internal/util/zzs;

    iget-object v0, p0, Lz5/rz;->v:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    invoke-static {v0}, Lcom/google/android/gms/ads/internal/util/zzs;->zzV(Landroid/app/Activity;)[I

    move-result-object v0

    aget v0, v0, v1

    goto :goto_16

    :cond_15
    move v0, v1

    :goto_16
    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object v2

    if-eqz v2, :cond_2a

    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object v2

    invoke-virtual {v2}, Lz5/he;->d()Z

    move-result v2

    if-nez v2, :cond_86

    :cond_2a
    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result v2

    iget-object v3, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {v3}, Lcom/google/android/gms/internal/ads/g2;->getHeight()I

    move-result v3

    sget-object v4, Lz5/so;->J:Lz5/no;

    .line 1
    sget-object v5, Lz5/xk;->d:Lz5/xk;

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

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

    move-result-object v4

    check-cast v4, Ljava/lang/Boolean;

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

    move-result v4

    if-eqz v4, :cond_6f

    if-nez v2, :cond_5c

    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object v2

    if-eqz v2, :cond_5b

    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object v2

    iget v2, v2, Lz5/he;->c:I

    goto :goto_5c

    :cond_5b
    move v2, v1

    :cond_5c
    :goto_5c
    if-nez v3, :cond_6f

    iget-object v3, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {v3}, Lcom/google/android/gms/internal/ads/g2;->f()Lz5/he;

    move-result-object v3

    if-eqz v3, :cond_70

    iget-object v1, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {v1}, Lcom/google/android/gms/internal/ads/g2;->f()Lz5/he;

    move-result-object v1

    iget v1, v1, Lz5/he;->b:I

    goto :goto_70

    :cond_6f
    move v1, v3

    .line 3
    :cond_70
    :goto_70
    sget-object v3, Lz5/wk;->f:Lz5/wk;

    iget-object v4, v3, Lz5/wk;->a:Lz5/z40;

    .line 4
    iget-object v5, p0, Lz5/rz;->v:Landroid/content/Context;

    invoke-virtual {v4, v5, v2}, Lz5/z40;->a(Landroid/content/Context;I)I

    move-result v2

    iput v2, p0, Lz5/rz;->F:I

    .line 5
    iget-object v2, v3, Lz5/wk;->a:Lz5/z40;

    .line 6
    iget-object v3, p0, Lz5/rz;->v:Landroid/content/Context;

    invoke-virtual {v2, v3, v1}, Lz5/z40;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, p0, Lz5/rz;->G:I

    :cond_86
    sub-int v0, p2, v0

    iget v1, p0, Lz5/rz;->F:I

    iget v2, p0, Lz5/rz;->G:I

    .line 7
    :try_start_8c
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    const-string v4, "x"

    invoke-virtual {v3, v4, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    move-result-object v3

    const-string v4, "y"

    invoke-virtual {v3, v4, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    move-result-object v0

    const-string v3, "width"

    invoke-virtual {v0, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    move-result-object v0

    const-string v1, "height"

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    move-result-object v0

    iget-object v1, p0, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

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

    const-string v2, "onDefaultPositionReceived"

    invoke-interface {v1, v2, v0}, Lz5/fw;->x(Ljava/lang/String;Lorg/json/JSONObject;)V
    :try_end_b2
    .catch Lorg/json/JSONException; {:try_start_8c .. :try_end_b2} :catch_b3

    goto :goto_b9

    :catch_b3
    move-exception v0

    const-string v1, "Error occurred while dispatching default position."

    invoke-static {v1, v0}, Lz5/d50;->zzg(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 8
    :goto_b9
    iget-object v0, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object v0

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

    .line 9
    iget-object v0, v0, Lcom/google/android/gms/internal/ads/h2;->K:Lz5/nz;

    if-eqz v0, :cond_c9

    .line 10
    iput p1, v0, Lz5/nz;->w:I

    iput p2, v0, Lz5/nz;->x:I

    :cond_c9
    return-void
.end method

.method public final a(Ljava/lang/Object;Ljava/util/Map;)V
    .registers 12

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

    new-instance p1, Landroid/util/DisplayMetrics;

    invoke-direct {p1}, Landroid/util/DisplayMetrics;-><init>()V

    iput-object p1, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    iget-object p1, p0, Lz5/rz;->w:Landroid/view/WindowManager;

    invoke-interface {p1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object p1

    iget-object p2, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    invoke-virtual {p1, p2}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    iget-object p2, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    iget p2, p2, Landroid/util/DisplayMetrics;->density:F

    iput p2, p0, Lz5/rz;->z:F

    invoke-virtual {p1}, Landroid/view/Display;->getRotation()I

    move-result p1

    iput p1, p0, Lz5/rz;->C:I

    .line 1
    sget-object p1, Lz5/wk;->f:Lz5/wk;

    iget-object p2, p1, Lz5/wk;->a:Lz5/z40;

    .line 2
    iget-object p2, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    iget v0, p2, Landroid/util/DisplayMetrics;->widthPixels:I

    int-to-float v0, v0

    .line 3
    iget p2, p2, Landroid/util/DisplayMetrics;->density:F

    div-float/2addr v0, p2

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result p2

    .line 4
    iput p2, p0, Lz5/rz;->A:I

    .line 5
    iget-object p2, p1, Lz5/wk;->a:Lz5/z40;

    .line 6
    iget-object p2, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    iget v0, p2, Landroid/util/DisplayMetrics;->heightPixels:I

    int-to-float v0, v0

    .line 7
    iget p2, p2, Landroid/util/DisplayMetrics;->density:F

    div-float/2addr v0, p2

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result p2

    .line 8
    iput p2, p0, Lz5/rz;->B:I

    iget-object p2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {p2}, Lcom/google/android/gms/internal/ads/g2;->zzj()Landroid/app/Activity;

    move-result-object p2

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-eqz p2, :cond_71

    invoke-virtual {p2}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v2

    if-nez v2, :cond_53

    goto :goto_71

    :cond_53
    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzc()Lcom/google/android/gms/ads/internal/util/zzs;

    invoke-static {p2}, Lcom/google/android/gms/ads/internal/util/zzs;->zzT(Landroid/app/Activity;)[I

    move-result-object p2

    .line 9
    iget-object v2, p1, Lz5/wk;->a:Lz5/z40;

    .line 10
    iget-object v2, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    aget v3, p2, v1

    invoke-static {v2, v3}, Lz5/z40;->k(Landroid/util/DisplayMetrics;I)I

    move-result v2

    iput v2, p0, Lz5/rz;->D:I

    .line 11
    iget-object p1, p1, Lz5/wk;->a:Lz5/z40;

    .line 12
    iget-object p1, p0, Lz5/rz;->y:Landroid/util/DisplayMetrics;

    aget p2, p2, v0

    invoke-static {p1, p2}, Lz5/z40;->k(Landroid/util/DisplayMetrics;I)I

    move-result p1

    goto :goto_77

    :cond_71
    :goto_71
    iget p1, p0, Lz5/rz;->A:I

    iput p1, p0, Lz5/rz;->D:I

    iget p1, p0, Lz5/rz;->B:I

    :goto_77
    iput p1, p0, Lz5/rz;->E:I

    iget-object p1, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

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

    move-result-object p1

    invoke-virtual {p1}, Lz5/he;->d()Z

    move-result p1

    if-eqz p1, :cond_8e

    iget p1, p0, Lz5/rz;->A:I

    iput p1, p0, Lz5/rz;->F:I

    iget p1, p0, Lz5/rz;->B:I

    iput p1, p0, Lz5/rz;->G:I

    goto :goto_93

    :cond_8e
    iget-object p1, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {p1, v1, v1}, Lcom/google/android/gms/internal/ads/g2;->measure(II)V

    :goto_93
    iget v3, p0, Lz5/rz;->A:I

    iget v4, p0, Lz5/rz;->B:I

    iget v5, p0, Lz5/rz;->D:I

    iget v6, p0, Lz5/rz;->E:I

    iget v7, p0, Lz5/rz;->z:F

    iget v8, p0, Lz5/rz;->C:I

    move-object v2, p0

    invoke-virtual/range {v2 .. v8}, Landroidx/appcompat/widget/n;->C(IIIIFI)V

    iget-object p1, p0, Lz5/rz;->x:Lz5/ho;

    new-instance p2, Landroid/content/Intent;

    const-string v2, "android.intent.action.DIAL"

    invoke-direct {p2, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "tel:"

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {p2, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    invoke-virtual {p1, p2}, Lz5/ho;->c(Landroid/content/Intent;)Z

    move-result p1

    iget-object p2, p0, Lz5/rz;->x:Lz5/ho;

    new-instance v2, Landroid/content/Intent;

    const-string v3, "android.intent.action.VIEW"

    invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v3, "sms:"

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    invoke-virtual {p2, v2}, Lz5/ho;->c(Landroid/content/Intent;)Z

    move-result p2

    iget-object v2, p0, Lz5/rz;->x:Lz5/ho;

    invoke-virtual {v2}, Lz5/ho;->b()Z

    move-result v2

    iget-object v3, p0, Lz5/rz;->x:Lz5/ho;

    invoke-virtual {v3}, Lz5/ho;->a()Z

    move-result v3

    iget-object v4, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    :try_start_dd
    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5}, Lorg/json/JSONObject;-><init>()V

    const-string v6, "sms"

    invoke-virtual {v5, v6, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    move-result-object p2

    const-string v5, "tel"

    invoke-virtual {p2, v5, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    move-result-object p1

    const-string p2, "calendar"

    invoke-virtual {p1, p2, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    move-result-object p1

    const-string p2, "storePicture"

    invoke-virtual {p1, p2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    move-result-object p1

    const-string p2, "inlineVideo"

    invoke-virtual {p1, p2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    move-result-object p1
    :try_end_100
    .catch Lorg/json/JSONException; {:try_start_dd .. :try_end_100} :catch_101

    goto :goto_108

    :catch_101
    move-exception p1

    const-string p2, "Error occurred while obtaining the MRAID capabilities."

    invoke-static {p2, p1}, Lz5/d50;->zzg(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/4 p1, 0x0

    :goto_108
    const-string p2, "onDeviceFeaturesReceived"

    invoke-interface {v4, p2, p1}, Lz5/fw;->x(Ljava/lang/String;Lorg/json/JSONObject;)V

    const/4 p1, 0x2

    new-array p2, p1, [I

    iget-object v2, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {v2, p2}, Lcom/google/android/gms/internal/ads/g2;->getLocationOnScreen([I)V

    .line 13
    sget-object v2, Lz5/wk;->f:Lz5/wk;

    iget-object v3, v2, Lz5/wk;->a:Lz5/z40;

    .line 14
    iget-object v4, p0, Lz5/rz;->v:Landroid/content/Context;

    aget v1, p2, v1

    invoke-virtual {v3, v4, v1}, Lz5/z40;->a(Landroid/content/Context;I)I

    move-result v1

    .line 15
    iget-object v2, v2, Lz5/wk;->a:Lz5/z40;

    .line 16
    iget-object v3, p0, Lz5/rz;->v:Landroid/content/Context;

    aget p2, p2, v0

    invoke-virtual {v2, v3, p2}, Lz5/z40;->a(Landroid/content/Context;I)I

    move-result p2

    invoke-virtual {p0, v1, p2}, Lz5/rz;->D(II)V

    invoke-static {p1}, Lz5/d50;->zzm(I)Z

    move-result p1

    if-eqz p1, :cond_139

    const-string p1, "Dispatching Ready Event."

    invoke-static {p1}, Lz5/d50;->zzh(Ljava/lang/String;)V

    :cond_139
    iget-object p1, p0, Lz5/rz;->u:Lcom/google/android/gms/internal/ads/g2;

    invoke-interface {p1}, Lcom/google/android/gms/internal/ads/g2;->zzt()Lz5/g50;

    move-result-object p1

    iget-object p1, p1, Lz5/g50;->r:Ljava/lang/String;

    .line 17
    :try_start_141
    new-instance p2, Lorg/json/JSONObject;

    invoke-direct {p2}, Lorg/json/JSONObject;-><init>()V

    const-string v0, "js"

    invoke-virtual {p2, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    move-result-object p1

    iget-object p2, p0, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

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

    const-string v0, "onReadyEventReceived"

    invoke-interface {p2, v0, p1}, Lz5/fw;->x(Ljava/lang/String;Lorg/json/JSONObject;)V
    :try_end_155
    .catch Lorg/json/JSONException; {:try_start_141 .. :try_end_155} :catch_156

    goto :goto_15c

    :catch_156
    move-exception p1

    const-string p2, "Error occurred while dispatching ready Event."

    invoke-static {p2, p1}, Lz5/d50;->zzg(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_15c
    return-void
.end method
