.class public final Lcom/google/android/gms/internal/ads/a5;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lz5/dg0;


# instance fields
.field public final r:Ljava/util/HashSet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashSet<",
            "Lcom/google/android/gms/internal/ads/t1;",
            ">;"
        }
    .end annotation

    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field

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

.field public final t:Lz5/w40;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lz5/w40;)V
    .registers 4

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

    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/a5;->r:Ljava/util/HashSet;

    iput-object p1, p0, Lcom/google/android/gms/internal/ads/a5;->s:Landroid/content/Context;

    iput-object p2, p0, Lcom/google/android/gms/internal/ads/a5;->t:Lz5/w40;

    return-void
.end method


# virtual methods
.method public final a()Landroid/os/Bundle;
    .registers 14

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/a5;->t:Lz5/w40;

    iget-object v1, p0, Lcom/google/android/gms/internal/ads/a5;->s:Landroid/content/Context;

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

    .line 1
    new-instance v2, Ljava/util/HashSet;

    invoke-direct {v2}, Ljava/util/HashSet;-><init>()V

    iget-object v3, v0, Lz5/w40;->a:Ljava/lang/Object;

    monitor-enter v3

    :try_start_f
    iget-object v4, v0, Lz5/w40;->e:Ljava/util/HashSet;

    invoke-virtual {v2, v4}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z

    iget-object v4, v0, Lz5/w40;->e:Ljava/util/HashSet;

    invoke-virtual {v4}, Ljava/util/HashSet;->clear()V

    monitor-exit v3
    :try_end_1a
    .catchall {:try_start_f .. :try_end_1a} :catchall_117

    new-instance v3, Landroid/os/Bundle;

    invoke-direct {v3}, Landroid/os/Bundle;-><init>()V

    const-string v4, "app"

    iget-object v5, v0, Lz5/w40;->d:Lcom/google/android/gms/internal/ads/v1;

    iget-object v6, v0, Lz5/w40;->c:Lcom/google/android/gms/internal/ads/w1;

    .line 2
    monitor-enter v6

    :try_start_26
    iget-object v7, v6, Lcom/google/android/gms/internal/ads/w1;->b:Ljava/lang/String;
    :try_end_28
    .catchall {:try_start_26 .. :try_end_28} :catchall_114

    monitor-exit v6

    .line 3
    iget-object v8, v5, Lcom/google/android/gms/internal/ads/v1;->f:Ljava/lang/Object;

    monitor-enter v8

    :try_start_2c
    new-instance v6, Landroid/os/Bundle;

    invoke-direct {v6}, Landroid/os/Bundle;-><init>()V

    iget-object v9, v5, Lcom/google/android/gms/internal/ads/v1;->h:Lcom/google/android/gms/ads/internal/util/zzg;

    invoke-interface {v9}, Lcom/google/android/gms/ads/internal/util/zzg;->zzC()Z

    move-result v9

    if-eqz v9, :cond_3c

    const-string v9, ""

    goto :goto_3e

    :cond_3c
    iget-object v9, v5, Lcom/google/android/gms/internal/ads/v1;->g:Ljava/lang/String;

    :goto_3e
    const-string v10, "session_id"

    invoke-virtual {v6, v10, v9}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v9, "basets"

    iget-wide v10, v5, Lcom/google/android/gms/internal/ads/v1;->b:J

    invoke-virtual {v6, v9, v10, v11}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    const-string v9, "currts"

    iget-wide v10, v5, Lcom/google/android/gms/internal/ads/v1;->a:J

    invoke-virtual {v6, v9, v10, v11}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    const-string v9, "seq_num"

    invoke-virtual {v6, v9, v7}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v7, "preqs"

    iget v9, v5, Lcom/google/android/gms/internal/ads/v1;->c:I

    invoke-virtual {v6, v7, v9}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v7, "preqs_in_session"

    iget v9, v5, Lcom/google/android/gms/internal/ads/v1;->d:I

    invoke-virtual {v6, v7, v9}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v7, "time_in_session"

    iget-wide v9, v5, Lcom/google/android/gms/internal/ads/v1;->e:J

    invoke-virtual {v6, v7, v9, v10}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    const-string v7, "pclick"

    iget v9, v5, Lcom/google/android/gms/internal/ads/v1;->i:I

    invoke-virtual {v6, v7, v9}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v7, "pimp"

    iget v5, v5, Lcom/google/android/gms/internal/ads/v1;->j:I

    invoke-virtual {v6, v7, v5}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v5, "support_transparent_background"

    invoke-static {v1}, Lz5/c20;->a(Landroid/content/Context;)Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    const-string v9, "Theme.Translucent"

    const-string v10, "style"

    const-string v11, "android"

    invoke-virtual {v7, v9, v10, v11}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v7

    const/4 v9, 0x0

    if-nez v7, :cond_91

    goto :goto_b5

    :cond_91
    new-instance v10, Landroid/content/ComponentName;

    invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v11

    const-string v12, "com.google.android.gms.ads.AdActivity"

    invoke-direct {v10, v11, v12}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_9c
    .catchall {:try_start_2c .. :try_end_9c} :catchall_111

    :try_start_9c
    invoke-virtual {v1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-virtual {v1, v10, v9}, Landroid/content/pm/PackageManager;->getActivityInfo(Landroid/content/ComponentName;I)Landroid/content/pm/ActivityInfo;

    move-result-object v1

    iget v1, v1, Landroid/content/pm/ActivityInfo;->theme:I

    if-ne v7, v1, :cond_aa

    const/4 v9, 0x1

    goto :goto_ba

    :cond_aa
    const-string v1, "Please set theme of AdActivity to @android:style/Theme.Translucent to enable transparent background interstitial ad."

    invoke-static {v1}, Lz5/d50;->zzh(Ljava/lang/String;)V
    :try_end_af
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_9c .. :try_end_af} :catch_b0
    .catchall {:try_start_9c .. :try_end_af} :catchall_111

    goto :goto_ba

    :catch_b0
    :try_start_b0
    const-string v1, "Fail to fetch AdActivity theme"

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

    :goto_b5
    const-string v1, "Please set theme of AdActivity to @android:style/Theme.Translucent to enable transparent background interstitial ad."

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

    :goto_ba
    invoke-virtual {v6, v5, v9}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    monitor-exit v8
    :try_end_be
    .catchall {:try_start_b0 .. :try_end_be} :catchall_111

    .line 4
    invoke-virtual {v3, v4, v6}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V

    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    iget-object v0, v0, Lz5/w40;->f:Ljava/util/HashSet;

    invoke-virtual {v0}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-nez v4, :cond_109

    const-string v0, "slots"

    invoke-virtual {v3, v0, v1}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    invoke-virtual {v2}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_e0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_f4

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/google/android/gms/internal/ads/t1;

    invoke-virtual {v4}, Lcom/google/android/gms/internal/ads/t1;->a()Landroid/os/Bundle;

    move-result-object v4

    invoke-virtual {v0, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_e0

    :cond_f4
    const-string v1, "ads"

    invoke-virtual {v3, v1, v0}, Landroid/os/Bundle;->putParcelableArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V

    .line 5
    monitor-enter p0

    :try_start_fa
    iget-object v0, p0, Lcom/google/android/gms/internal/ads/a5;->r:Ljava/util/HashSet;

    invoke-virtual {v0}, Ljava/util/HashSet;->clear()V

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/a5;->r:Ljava/util/HashSet;

    invoke-virtual {v0, v2}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z
    :try_end_104
    .catchall {:try_start_fa .. :try_end_104} :catchall_106

    monitor-exit p0

    return-object v3

    :catchall_106
    move-exception v0

    monitor-exit p0

    throw v0

    .line 6
    :cond_109
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lz5/v40;

    const/4 v0, 0x0

    throw v0

    :catchall_111
    move-exception v0

    .line 7
    :try_start_112
    monitor-exit v8
    :try_end_113
    .catchall {:try_start_112 .. :try_end_113} :catchall_111

    throw v0

    :catchall_114
    move-exception v0

    .line 8
    monitor-exit v6

    throw v0

    :catchall_117
    move-exception v0

    .line 9
    :try_start_118
    monitor-exit v3
    :try_end_119
    .catchall {:try_start_118 .. :try_end_119} :catchall_117

    throw v0
.end method

.method public final declared-synchronized z(Lz5/sj;)V
    .registers 4

    monitor-enter p0

    :try_start_1
    iget p1, p1, Lz5/sj;->r:I

    const/4 v0, 0x3

    if-eq p1, v0, :cond_18

    iget-object p1, p0, Lcom/google/android/gms/internal/ads/a5;->t:Lz5/w40;

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/a5;->r:Ljava/util/HashSet;

    .line 1
    iget-object v1, p1, Lz5/w40;->a:Ljava/lang/Object;

    monitor-enter v1
    :try_end_d
    .catchall {:try_start_1 .. :try_end_d} :catchall_1a

    :try_start_d
    iget-object p1, p1, Lz5/w40;->e:Ljava/util/HashSet;

    invoke-virtual {p1, v0}, Ljava/util/HashSet;->addAll(Ljava/util/Collection;)Z

    monitor-exit v1
    :try_end_13
    .catchall {:try_start_d .. :try_end_13} :catchall_15

    .line 2
    monitor-exit p0

    return-void

    :catchall_15
    move-exception p1

    .line 3
    :try_start_16
    monitor-exit v1
    :try_end_17
    .catchall {:try_start_16 .. :try_end_17} :catchall_15

    :try_start_17
    throw p1
    :try_end_18
    .catchall {:try_start_17 .. :try_end_18} :catchall_1a

    .line 4
    :cond_18
    monitor-exit p0

    return-void

    :catchall_1a
    move-exception p1

    monitor-exit p0

    throw p1
.end method
