.class public final Lz5/io0;
.super Lz5/yv;
.source ""

# interfaces
.implements Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
.implements Landroid/view/ViewTreeObserver$OnScrollChangedListener;
.implements Lz5/kq;


# instance fields
.field public r:Landroid/view/View;

.field public s:Lz5/an;

.field public t:Lz5/em0;

.field public u:Z

.field public v:Z


# direct methods
.method public constructor <init>(Lz5/em0;Lz5/hm0;)V
    .registers 4

    invoke-direct {p0}, Lz5/yv;-><init>()V

    invoke-virtual {p2}, Lz5/hm0;->h()Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lz5/io0;->r:Landroid/view/View;

    invoke-virtual {p2}, Lz5/hm0;->u()Lz5/an;

    move-result-object v0

    iput-object v0, p0, Lz5/io0;->s:Lz5/an;

    iput-object p1, p0, Lz5/io0;->t:Lz5/em0;

    const/4 p1, 0x0

    iput-boolean p1, p0, Lz5/io0;->u:Z

    iput-boolean p1, p0, Lz5/io0;->v:Z

    invoke-virtual {p2}, Lz5/hm0;->k()Lcom/google/android/gms/internal/ads/g2;

    move-result-object p1

    if-eqz p1, :cond_23

    invoke-virtual {p2}, Lz5/hm0;->k()Lcom/google/android/gms/internal/ads/g2;

    move-result-object p1

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

    :cond_23
    return-void
.end method

.method public static final H2(Lz5/bw;I)V
    .registers 2

    :try_start_0
    invoke-interface {p0, p1}, Lz5/bw;->f(I)V
    :try_end_3
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_3} :catch_4

    return-void

    :catch_4
    move-exception p0

    const-string p1, "#007 Could not call remote method."

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

    return-void
.end method


# virtual methods
.method public final G2(Lx5/a;Lz5/bw;)V
    .registers 6

    const-string v0, "#008 Must be called on the main UI thread."

    invoke-static {v0}, Lcom/google/android/gms/common/internal/d;->d(Ljava/lang/String;)V

    iget-boolean v0, p0, Lz5/io0;->u:Z

    if-eqz v0, :cond_13

    const-string p1, "Instream ad can not be shown after destroy()."

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

    const/4 p1, 0x2

    invoke-static {p2, p1}, Lz5/io0;->H2(Lz5/bw;I)V

    return-void

    :cond_13
    iget-object v0, p0, Lz5/io0;->r:Landroid/view/View;

    if-eqz v0, :cond_5e

    iget-object v1, p0, Lz5/io0;->s:Lz5/an;

    if-nez v1, :cond_1c

    goto :goto_5e

    :cond_1c
    iget-boolean v0, p0, Lz5/io0;->v:Z

    const/4 v1, 0x1

    if-eqz v0, :cond_2a

    const-string p1, "Instream ad should not be used again."

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

    invoke-static {p2, v1}, Lz5/io0;->H2(Lz5/bw;I)V

    return-void

    :cond_2a
    iput-boolean v1, p0, Lz5/io0;->v:Z

    invoke-virtual {p0}, Lz5/io0;->zzg()V

    invoke-static {p1}, Lx5/b;->D(Lx5/a;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/view/ViewGroup;

    iget-object v0, p0, Lz5/io0;->r:Landroid/view/View;

    new-instance v1, Landroid/view/ViewGroup$LayoutParams;

    const/4 v2, -0x1

    invoke-direct {v1, v2, v2}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {p1, v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzz()Lz5/o50;

    iget-object p1, p0, Lz5/io0;->r:Landroid/view/View;

    invoke-static {p1, p0}, Lz5/o50;->a(Landroid/view/View;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzz()Lz5/o50;

    iget-object p1, p0, Lz5/io0;->r:Landroid/view/View;

    invoke-static {p1, p0}, Lz5/o50;->b(Landroid/view/View;Landroid/view/ViewTreeObserver$OnScrollChangedListener;)V

    invoke-virtual {p0}, Lz5/io0;->zzh()V

    :try_start_53
    invoke-interface {p2}, Lz5/bw;->zze()V
    :try_end_56
    .catch Landroid/os/RemoteException; {:try_start_53 .. :try_end_56} :catch_57

    return-void

    :catch_57
    move-exception p1

    const-string p2, "#007 Could not call remote method."

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

    return-void

    :cond_5e
    :goto_5e
    if-nez v0, :cond_63

    const-string p1, "can not get video view."

    goto :goto_65

    :cond_63
    const-string p1, "can not get video controller."

    :goto_65
    const-string v0, "Instream internal error: "

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v1

    if-eqz v1, :cond_72

    invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    goto :goto_77

    :cond_72
    new-instance p1, Ljava/lang/String;

    invoke-direct {p1, v0}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

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

    const/4 p1, 0x0

    invoke-static {p2, p1}, Lz5/io0;->H2(Lz5/bw;I)V

    return-void
.end method

.method public final onGlobalLayout()V
    .registers 1

    invoke-virtual {p0}, Lz5/io0;->zzh()V

    return-void
.end method

.method public final onScrollChanged()V
    .registers 1

    invoke-virtual {p0}, Lz5/io0;->zzh()V

    return-void
.end method

.method public final zzc()V
    .registers 2

    const-string v0, "#008 Must be called on the main UI thread."

    invoke-static {v0}, Lcom/google/android/gms/common/internal/d;->d(Ljava/lang/String;)V

    invoke-virtual {p0}, Lz5/io0;->zzg()V

    iget-object v0, p0, Lz5/io0;->t:Lz5/em0;

    if-eqz v0, :cond_f

    invoke-virtual {v0}, Lz5/em0;->b()V

    :cond_f
    const/4 v0, 0x0

    iput-object v0, p0, Lz5/io0;->t:Lz5/em0;

    iput-object v0, p0, Lz5/io0;->r:Landroid/view/View;

    iput-object v0, p0, Lz5/io0;->s:Lz5/an;

    const/4 v0, 0x1

    iput-boolean v0, p0, Lz5/io0;->u:Z

    return-void
.end method

.method public final zzg()V
    .registers 3

    iget-object v0, p0, Lz5/io0;->r:Landroid/view/View;

    if-nez v0, :cond_5

    return-void

    :cond_5
    invoke-virtual {v0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    instance-of v1, v0, Landroid/view/ViewGroup;

    if-eqz v1, :cond_14

    check-cast v0, Landroid/view/ViewGroup;

    iget-object v1, p0, Lz5/io0;->r:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_14
    return-void
.end method

.method public final zzh()V
    .registers 6

    iget-object v0, p0, Lz5/io0;->t:Lz5/em0;

    if-eqz v0, :cond_19

    iget-object v1, p0, Lz5/io0;->r:Landroid/view/View;

    if-eqz v1, :cond_19

    invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;

    move-result-object v2

    invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;

    move-result-object v3

    iget-object v4, p0, Lz5/io0;->r:Landroid/view/View;

    invoke-static {v4}, Lz5/em0;->c(Landroid/view/View;)Z

    move-result v4

    invoke-virtual {v0, v1, v2, v3, v4}, Lz5/em0;->n(Landroid/view/View;Ljava/util/Map;Ljava/util/Map;Z)V

    :cond_19
    return-void
.end method
