zzb.smali

.class final Lcom/google/android/gms/ads/identifier/zzb;
.super Ljava/lang/Thread;
.source "SourceFile"


# annotations
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
.end annotation


# instance fields
.field public final zza:Ljava/util/concurrent/CountDownLatch;

.field public zzb:Z

.field private final zzc:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference<",
            "Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;",
            ">;"
        }
    .end annotation
.end field

.field private final zzd:J


# direct methods
.method public constructor <init>(Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;J)V
    .registers 5

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

    new-instance v0, Ljava/lang/ref/WeakReference;

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

    iput-object v0, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzc:Ljava/lang/ref/WeakReference;

    iput-wide p2, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzd:J

    new-instance p1, Ljava/util/concurrent/CountDownLatch;

    const/4 p2, 0x1

    .line 3
    invoke-direct {p1, p2}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V

    iput-object p1, p0, Lcom/google/android/gms/ads/identifier/zzb;->zza:Ljava/util/concurrent/CountDownLatch;

    const/4 p1, 0x0

    iput-boolean p1, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzb:Z

    .line 4
    invoke-static {p0}, Lcom/google/android/gms/ads/identifier/zzb;->INVOKEVIRTUAL_com_google_android_gms_ads_identifier_zzb_com_shopee_app_asm_fix_androidx_ThreadFixer_start(Lcom/google/android/gms/ads/identifier/zzb;)V

    return-void
.end method

.method public static INVOKEVIRTUAL_com_google_android_gms_ads_identifier_zzb_com_shopee_app_asm_fix_androidx_ThreadFixer_start(Lcom/google/android/gms/ads/identifier/zzb;)V
    .registers 3

    .line 1
    :try_start_0
    invoke-static {}, Lcom/shopee/app/asm/fix/androidx/b;->b()Z

    move-result v0

    if-eqz v0, :cond_12

    .line 2
    invoke-static {p0}, Lcom/shopee/app/asm/fix/androidx/b;->a(Ljava/lang/Thread;)V
    :try_end_9
    .catchall {:try_start_0 .. :try_end_9} :catchall_a

    goto :goto_12

    :catchall_a
    move-exception v0

    .line 3
    invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V

    .line 4
    :cond_12
    :goto_12
    invoke-virtual {p0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method private final zza()V
    .registers 2

    iget-object v0, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzc:Ljava/lang/ref/WeakReference;

    .line 1
    invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    if-eqz v0, :cond_10

    .line 2
    invoke-virtual {v0}, Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;->zza()V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzb:Z

    :cond_10
    return-void
.end method


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

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v1

    if-ne v0, v1, :cond_c

    const/4 v0, 0x1

    goto :goto_d

    :cond_c
    const/4 v0, 0x0

    :goto_d
    const-string v1, "runnable"

    const-string v2, "com/google/android/gms/ads/identifier/zzb"

    const-string v3, "run"

    if-eqz v0, :cond_18

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_18
    :try_start_18
    iget-object v4, p0, Lcom/google/android/gms/ads/identifier/zzb;->zza:Ljava/util/concurrent/CountDownLatch;

    iget-wide v5, p0, Lcom/google/android/gms/ads/identifier/zzb;->zzd:J

    sget-object v7, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    .line 1
    invoke-virtual {v4, v5, v6, v7}, Ljava/util/concurrent/CountDownLatch;->await(JLjava/util/concurrent/TimeUnit;)Z

    move-result v4

    if-nez v4, :cond_2d

    .line 2
    invoke-direct {p0}, Lcom/google/android/gms/ads/identifier/zzb;->zza()V

    if-eqz v0, :cond_2c

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_2c
    .catch Ljava/lang/InterruptedException; {:try_start_18 .. :try_end_2c} :catch_33

    :cond_2c
    return-void

    :cond_2d
    if-eqz v0, :cond_32

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_32
    return-void

    :catch_33
    nop

    .line 3
    invoke-direct {p0}, Lcom/google/android/gms/ads/identifier/zzb;->zza()V

    if-eqz v0, :cond_3c

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_3c
    return-void
.end method