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

# interfaces
.implements Ljava/util/concurrent/Callable;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Ljava/util/concurrent/Callable<",
        "Lz5/v10;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic a:I

.field public b:Ljava/lang/Object;

.field public c:Ljava/lang/Object;


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

    const/4 v0, 0x3

    iput v0, p0, Lz5/w10;->a:I

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

    iput-object p1, p0, Lz5/w10;->b:Ljava/lang/Object;

    iput-object p2, p0, Lz5/w10;->c:Ljava/lang/Object;

    return-void
.end method

.method public constructor <init>(Lcom/google/android/gms/internal/ads/v3;Lcom/google/android/gms/internal/ads/k1;)V
    .registers 4

    const/4 v0, 0x1

    iput v0, p0, Lz5/w10;->a:I

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

    iput-object p1, p0, Lz5/w10;->b:Ljava/lang/Object;

    iput-object p2, p0, Lz5/w10;->c:Ljava/lang/Object;

    return-void
.end method

.method public synthetic constructor <init>(Lj6/y3;Ljava/lang/String;)V
    .registers 4

    const/4 v0, 0x2

    iput v0, p0, Lz5/w10;->a:I

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

    iput-object p1, p0, Lz5/w10;->b:Ljava/lang/Object;

    iput-object p2, p0, Lz5/w10;->c:Ljava/lang/Object;

    return-void
.end method

.method public constructor <init>(Lz5/y10;Landroid/content/Context;)V
    .registers 4

    const/4 v0, 0x0

    iput v0, p0, Lz5/w10;->a:I

    .line 4
    iput-object p1, p0, Lz5/w10;->c:Ljava/lang/Object;

    iput-object p2, p0, Lz5/w10;->b:Ljava/lang/Object;

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

    return-void
.end method


# virtual methods
.method public final call()Ljava/lang/Object;
    .registers 11

    iget v0, p0, Lz5/w10;->a:I

    packed-switch v0, :pswitch_data_1fc

    goto/16 :goto_c4

    .line 1
    :pswitch_7
    iget-object v0, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v0, Lj6/y3;

    iget-object v1, p0, Lz5/w10;->c:Ljava/lang/Object;

    check-cast v1, Ljava/lang/String;

    new-instance v2, Lg6/e8;

    new-instance v3, Lj6/x3;

    invoke-direct {v3, v0, v1}, Lj6/x3;-><init>(Lj6/y3;Ljava/lang/String;)V

    const-string v0, "internal.remoteConfig"

    invoke-direct {v2, v0, v3}, Lg6/e8;-><init>(Ljava/lang/String;Lj6/x3;)V

    return-object v2

    .line 2
    :pswitch_1c
    iget-object v0, p0, Lz5/w10;->b:Ljava/lang/Object;

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

    iget-object v1, p0, Lz5/w10;->c:Ljava/lang/Object;

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

    .line 3
    iget-object v0, v0, Lcom/google/android/gms/internal/ads/v3;->u:Ljava/lang/Object;

    check-cast v0, Lz5/js0;

    iget-object v2, v0, Lz5/ms0;->s:Ljava/lang/Object;

    monitor-enter v2

    :try_start_2b
    iget-boolean v3, v0, Lz5/ms0;->t:Z

    if-eqz v3, :cond_30

    goto :goto_46

    :cond_30
    const/4 v3, 0x1

    iput-boolean v3, v0, Lz5/ms0;->t:Z

    iput-object v1, v0, Lz5/ms0;->v:Lcom/google/android/gms/internal/ads/k1;

    iget-object v1, v0, Lz5/ms0;->w:Lz5/g10;

    invoke-virtual {v1}, Lcom/google/android/gms/common/internal/a;->checkAvailabilityAndConnect()V

    iget-object v1, v0, Lz5/ms0;->r:Lcom/google/android/gms/internal/ads/y1;

    new-instance v3, Lz5/dc0;

    invoke-direct {v3, v0}, Lz5/dc0;-><init>(Lz5/js0;)V

    sget-object v4, Lz5/k50;->f:Lz5/gc1;

    invoke-virtual {v1, v3, v4}, Lcom/google/android/gms/internal/ads/y1;->zze(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V

    :goto_46
    iget-object v0, v0, Lz5/ms0;->r:Lcom/google/android/gms/internal/ads/y1;

    monitor-exit v2
    :try_end_49
    .catchall {:try_start_2b .. :try_end_49} :catchall_63

    sget-object v1, Lz5/so;->p3:Lz5/no;

    .line 4
    sget-object v2, Lz5/xk;->d:Lz5/xk;

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

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

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

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

    move-result v1

    int-to-long v1, v1

    sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v0, v1, v2, v3}, Ljava/util/concurrent/Future;->get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/io/InputStream;

    return-object v0

    :catchall_63
    move-exception v0

    :try_start_64
    monitor-exit v2
    :try_end_65
    .catchall {:try_start_64 .. :try_end_65} :catchall_63

    throw v0

    .line 6
    :pswitch_66
    iget-object v0, p0, Lz5/w10;->c:Ljava/lang/Object;

    check-cast v0, Lz5/y10;

    .line 7
    iget-object v0, v0, Lz5/y10;->a:Ljava/util/WeakHashMap;

    .line 8
    iget-object v1, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v1, Landroid/content/Context;

    invoke-virtual {v0, v1}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lz5/x10;

    if-eqz v0, :cond_a4

    iget-wide v1, v0, Lz5/x10;->a:J

    sget-object v3, Lz5/kp;->a:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {v3}, Lcom/google/android/gms/internal/ads/k;->l()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    add-long/2addr v3, v1

    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzj()Lu5/c;

    move-result-object v1

    invoke-interface {v1}, Lu5/c;->b()J

    move-result-wide v1

    cmp-long v1, v3, v1

    if-gez v1, :cond_94

    goto :goto_a4

    :cond_94
    new-instance v1, Lz5/u10;

    iget-object v2, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v2, Landroid/content/Context;

    iget-object v0, v0, Lz5/x10;->b:Lz5/v10;

    invoke-direct {v1, v2, v0}, Lz5/u10;-><init>(Landroid/content/Context;Lz5/v10;)V

    invoke-virtual {v1}, Lz5/u10;->a()Lz5/v10;

    move-result-object v0

    goto :goto_b1

    :cond_a4
    :goto_a4
    new-instance v0, Lz5/u10;

    iget-object v1, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v1, Landroid/content/Context;

    invoke-direct {v0, v1}, Lz5/u10;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Lz5/u10;->a()Lz5/v10;

    move-result-object v0

    :goto_b1
    iget-object v1, p0, Lz5/w10;->c:Ljava/lang/Object;

    check-cast v1, Lz5/y10;

    .line 9
    iget-object v1, v1, Lz5/y10;->a:Ljava/util/WeakHashMap;

    .line 10
    iget-object v2, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v2, Landroid/content/Context;

    new-instance v3, Lz5/x10;

    invoke-direct {v3, v0}, Lz5/x10;-><init>(Lz5/v10;)V

    invoke-virtual {v1, v2, v3}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object v0

    .line 11
    :goto_c4
    iget-object v0, p0, Lz5/w10;->b:Ljava/lang/Object;

    check-cast v0, Landroid/content/Context;

    iget-object v1, p0, Lz5/w10;->c:Ljava/lang/Object;

    check-cast v1, Landroid/content/Intent;

    sget-object v2, Lcom/google/firebase/messaging/a;->b:Ljava/lang/Object;

    .line 12
    invoke-static {}, Lcom/google/firebase/messaging/d;->a()Lcom/google/firebase/messaging/d;

    move-result-object v2

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

    const-string v3, "FirebaseMessaging"

    const/4 v4, 0x3

    .line 13
    invoke-static {v3, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z

    move-result v3

    if-eqz v3, :cond_e5

    const-string v3, "FirebaseMessaging"

    const-string v5, "Starting service"

    invoke-static {v3, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_e5
    iget-object v3, v2, Lcom/google/firebase/messaging/d;->d:Ljava/util/Queue;

    invoke-interface {v3, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z

    new-instance v1, Landroid/content/Intent;

    const-string v3, "com.google.firebase.MESSAGING_EVENT"

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

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

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 14
    monitor-enter v2

    :try_start_f9
    iget-object v3, v2, Lcom/google/firebase/messaging/d;->a:Ljava/lang/String;

    if-eqz v3, :cond_fe

    goto :goto_14c

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

    move-result-object v3

    const/4 v5, 0x0

    invoke-virtual {v3, v1, v5}, Landroid/content/pm/PackageManager;->resolveService(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v3

    const/4 v5, 0x0

    if-eqz v3, :cond_182

    iget-object v3, v3, Landroid/content/pm/ResolveInfo;->serviceInfo:Landroid/content/pm/ServiceInfo;

    if-nez v3, :cond_110

    goto/16 :goto_182

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

    move-result-object v6

    iget-object v7, v3, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;

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

    move-result v6

    if-eqz v6, :cond_14f

    iget-object v6, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;

    if-nez v6, :cond_121

    goto :goto_14f

    :cond_121
    const-string v5, "."

    invoke-virtual {v6, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_148

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

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

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

    move-result v6

    if-eqz v6, :cond_142

    invoke-virtual {v5, v3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    goto :goto_14a

    :cond_142
    new-instance v3, Ljava/lang/String;

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

    goto :goto_14a

    :cond_148
    iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;

    :goto_14a
    iput-object v3, v2, Lcom/google/firebase/messaging/d;->a:Ljava/lang/String;
    :try_end_14c
    .catchall {:try_start_f9 .. :try_end_14c} :catchall_1f9

    :goto_14c
    monitor-exit v2

    move-object v5, v3

    goto :goto_18a

    :cond_14f
    :goto_14f
    :try_start_14f
    iget-object v6, v3, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;

    iget-object v3, v3, Landroid/content/pm/ServiceInfo;->name:Ljava/lang/String;

    invoke-static {v6}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

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

    move-result v7

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

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

    move-result v8

    new-instance v9, Ljava/lang/StringBuilder;

    add-int/lit8 v7, v7, 0x5e

    add-int/2addr v7, v8

    invoke-direct {v9, v7}, Ljava/lang/StringBuilder;-><init>(I)V

    const-string v7, "Error resolving target intent service, skipping classname enforcement. Resolved service was: "

    invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v9, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v6, "/"

    invoke-virtual {v9, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v9, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "FirebaseMessaging"

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    goto :goto_186

    :cond_182
    :goto_182
    const-string v3, "FirebaseMessaging"

    const-string v6, "Failed to resolve target intent service, skipping classname enforcement"

    :goto_186
    invoke-static {v3, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_189
    .catchall {:try_start_14f .. :try_end_189} :catchall_1f9

    monitor-exit v2

    :goto_18a
    if-eqz v5, :cond_1b3

    const-string v3, "FirebaseMessaging"

    .line 15
    invoke-static {v3, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z

    move-result v3

    if-eqz v3, :cond_1ac

    const-string v3, "Restricting intent to a specific service: "

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

    move-result v4

    if-eqz v4, :cond_1a1

    invoke-virtual {v3, v5}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    goto :goto_1a7

    :cond_1a1
    new-instance v4, Ljava/lang/String;

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

    move-object v3, v4

    :goto_1a7
    const-string v4, "FirebaseMessaging"

    invoke-static {v4, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

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

    move-result-object v3

    invoke-virtual {v1, v3, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    :cond_1b3
    :try_start_1b3
    invoke-virtual {v2, v0}, Lcom/google/firebase/messaging/d;->c(Landroid/content/Context;)Z

    move-result v2

    if-eqz v2, :cond_1be

    invoke-static {v0, v1}, Lcom/google/firebase/messaging/g;->a(Landroid/content/Context;Landroid/content/Intent;)Landroid/content/ComponentName;

    move-result-object v0

    goto :goto_1c9

    :cond_1be
    invoke-virtual {v0, v1}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    move-result-object v0

    const-string v1, "FirebaseMessaging"

    const-string v2, "Missing wake lock permission, service start may be delayed"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :goto_1c9
    if-nez v0, :cond_1d5

    const-string v0, "FirebaseMessaging"

    const-string v1, "Error while delivering the message: ServiceIntent not found."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_1d2
    .catch Ljava/lang/SecurityException; {:try_start_1b3 .. :try_end_1d2} :catch_1ea
    .catch Ljava/lang/IllegalStateException; {:try_start_1b3 .. :try_end_1d2} :catch_1d7

    const/16 v0, 0x194

    goto :goto_1f4

    :cond_1d5
    const/4 v0, -0x1

    goto :goto_1f4

    :catch_1d7
    move-exception v0

    const-string v1, "FirebaseMessaging"

    const-string v2, "Failed to start service while in background: "

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

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

    move-result-object v0

    invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    const/16 v0, 0x192

    goto :goto_1f4

    :catch_1ea
    move-exception v0

    const-string v1, "FirebaseMessaging"

    const-string v2, "Error while delivering the message to the serviceIntent"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    const/16 v0, 0x191

    .line 16
    :goto_1f4
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    return-object v0

    :catchall_1f9
    move-exception v0

    .line 17
    monitor-exit v2

    throw v0

    :pswitch_data_1fc
    .packed-switch 0x0
        :pswitch_66
        :pswitch_1c
        :pswitch_7
    .end packed-switch
.end method
