.class public Lcom/google/firebase/messaging/FirebaseMessaging;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/google/firebase/messaging/FirebaseMessaging$a;
    }
.end annotation


# static fields
.field public static final l:J

.field public static m:Lcom/google/firebase/messaging/e;
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "FirebaseMessaging.class"
    .end annotation
.end field

.field public static n:Lw4/g;
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "FirebaseUnknownNullness"
        }
    .end annotation
.end field

.field public static o:Ljava/util/concurrent/ScheduledExecutorService;
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "FirebaseMessaging.class"
    .end annotation
.end field


# instance fields
.field public final a:Lcom/google/firebase/a;

.field public final b:Ld8/a;

.field public final c:Lf8/d;

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

.field public final e:Lk8/q;

.field public final f:Lcom/google/firebase/messaging/c;

.field public final g:Lcom/google/firebase/messaging/FirebaseMessaging$a;

.field public final h:Ljava/util/concurrent/Executor;

.field public final i:Ljava/util/concurrent/Executor;

.field public final j:Lcom/google/firebase/messaging/b;

.field public k:Z
    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "this"
    .end annotation
.end field


# direct methods
.method public static constructor <clinit>()V
    .registers 3

    sget-object v0, Ljava/util/concurrent/TimeUnit;->HOURS:Ljava/util/concurrent/TimeUnit;

    const-wide/16 v1, 0x8

    invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J

    move-result-wide v0

    sput-wide v0, Lcom/google/firebase/messaging/FirebaseMessaging;->l:J

    return-void
.end method

.method public constructor <init>(Lcom/google/firebase/a;Ld8/a;Le8/a;Le8/a;Lf8/d;Lw4/g;Lb8/d;)V
    .registers 16
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/firebase/a;",
            "Ld8/a;",
            "Le8/a<",
            "Lm8/h;",
            ">;",
            "Le8/a<",
            "Lc8/e;",
            ">;",
            "Lf8/d;",
            "Lw4/g;",
            "Lb8/d;",
            ")V"
        }
    .end annotation

    new-instance v6, Lcom/google/firebase/messaging/b;

    .line 1
    invoke-virtual {p1}, Lcom/google/firebase/a;->a()V

    iget-object v0, p1, Lcom/google/firebase/a;->a:Landroid/content/Context;

    .line 2
    invoke-direct {v6, v0}, Lcom/google/firebase/messaging/b;-><init>(Landroid/content/Context;)V

    .line 3
    new-instance v7, Lk8/q;

    move-object v0, v7

    move-object v1, p1

    move-object v2, v6

    move-object v3, p3

    move-object v4, p4

    move-object v5, p5

    invoke-direct/range {v0 .. v5}, Lk8/q;-><init>(Lcom/google/firebase/a;Lcom/google/firebase/messaging/b;Le8/a;Le8/a;Lf8/d;)V

    .line 4
    new-instance p3, Lv5/a;

    const-string p4, "Firebase-Messaging-Task"

    invoke-direct {p3, p4}, Lv5/a;-><init>(Ljava/lang/String;)V

    invoke-static {p3}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;

    move-result-object p3

    .line 5
    new-instance v0, Ljava/util/concurrent/ScheduledThreadPoolExecutor;

    new-instance p4, Lv5/a;

    const-string v1, "Firebase-Messaging-Init"

    invoke-direct {p4, v1}, Lv5/a;-><init>(Ljava/lang/String;)V

    const/4 v1, 0x1

    invoke-direct {v0, v1, p4}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V

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

    const/4 v2, 0x0

    iput-boolean v2, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->k:Z

    sput-object p6, Lcom/google/firebase/messaging/FirebaseMessaging;->n:Lw4/g;

    iput-object p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->a:Lcom/google/firebase/a;

    iput-object p2, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->b:Ld8/a;

    iput-object p5, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->c:Lf8/d;

    new-instance p4, Lcom/google/firebase/messaging/FirebaseMessaging$a;

    invoke-direct {p4, p0, p7}, Lcom/google/firebase/messaging/FirebaseMessaging$a;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;Lb8/d;)V

    iput-object p4, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->g:Lcom/google/firebase/messaging/FirebaseMessaging$a;

    .line 7
    invoke-virtual {p1}, Lcom/google/firebase/a;->a()V

    iget-object p4, p1, Lcom/google/firebase/a;->a:Landroid/content/Context;

    .line 8
    iput-object p4, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->d:Landroid/content/Context;

    new-instance p5, Lk8/i;

    invoke-direct {p5}, Lk8/i;-><init>()V

    iput-object v6, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->j:Lcom/google/firebase/messaging/b;

    iput-object p3, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->i:Ljava/util/concurrent/Executor;

    iput-object v7, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->e:Lk8/q;

    new-instance p6, Lcom/google/firebase/messaging/c;

    invoke-direct {p6, p3}, Lcom/google/firebase/messaging/c;-><init>(Ljava/util/concurrent/Executor;)V

    iput-object p6, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->f:Lcom/google/firebase/messaging/c;

    iput-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->h:Ljava/util/concurrent/Executor;

    .line 9
    invoke-virtual {p1}, Lcom/google/firebase/a;->a()V

    iget-object p1, p1, Lcom/google/firebase/a;->a:Landroid/content/Context;

    .line 10
    instance-of p3, p1, Landroid/app/Application;

    if-eqz p3, :cond_6c

    check-cast p1, Landroid/app/Application;

    invoke-virtual {p1, p5}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V

    goto :goto_84

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

    move-result-object p1

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

    move-result p3

    new-instance p5, Ljava/lang/StringBuilder;

    add-int/lit8 p3, p3, 0x7d

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

    const-string p3, "Context "

    const-string p6, " was not an application, can\'t register for lifecycle callbacks. Some notification events may be dropped as a result."

    const-string p7, "FirebaseMessaging"

    invoke-static {p5, p3, p1, p6, p7}, Ly5/a;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :goto_84
    if-eqz p2, :cond_8e

    new-instance p1, Lk8/j;

    invoke-direct {p1, p0, v1}, Lk8/j;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;I)V

    invoke-interface {p2, p1}, Ld8/a;->b(Ld8/a$a;)V

    :cond_8e
    new-instance p1, Lk8/m;

    invoke-direct {p1, p0, v2}, Lk8/m;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;I)V

    invoke-virtual {v0, p1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V

    .line 11
    new-instance p7, Ljava/util/concurrent/ScheduledThreadPoolExecutor;

    new-instance p1, Lv5/a;

    const-string p2, "Firebase-Messaging-Topics-Io"

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

    invoke-direct {p7, v1, p1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V

    .line 12
    sget p1, Lk8/e0;->j:I

    .line 13
    new-instance v3, Lk8/d0;

    move-object p1, v3

    move-object p2, p4

    move-object p3, p7

    move-object p4, p0

    move-object p5, v6

    move-object p6, v7

    invoke-direct/range {p1 .. p6}, Lk8/d0;-><init>(Landroid/content/Context;Ljava/util/concurrent/ScheduledExecutorService;Lcom/google/firebase/messaging/FirebaseMessaging;Lcom/google/firebase/messaging/b;Lk8/q;)V

    invoke-static {p7, v3}, Ln6/l;->c(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Callable;)Ln6/i;

    move-result-object p1

    .line 14
    new-instance p2, Lk8/j;

    invoke-direct {p2, p0, v2}, Lk8/j;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;I)V

    check-cast p1, Ln6/u;

    .line 15
    iget-object p3, p1, Ln6/u;->b:Ln6/s;

    new-instance p4, Ln6/q;

    invoke-direct {p4, v0, p2}, Ln6/q;-><init>(Ljava/util/concurrent/Executor;Ln6/f;)V

    invoke-virtual {p3, p4}, Ln6/s;->a(Ln6/r;)V

    invoke-virtual {p1}, Ln6/u;->t()V

    .line 16
    new-instance p1, Lk8/m;

    invoke-direct {p1, p0, v1}, Lk8/m;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;I)V

    invoke-virtual {v0, p1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V

    return-void
.end method

.method public static declared-synchronized c(Landroid/content/Context;)Lcom/google/firebase/messaging/e;
    .registers 3

    const-class v0, Lcom/google/firebase/messaging/FirebaseMessaging;

    monitor-enter v0

    :try_start_3
    sget-object v1, Lcom/google/firebase/messaging/FirebaseMessaging;->m:Lcom/google/firebase/messaging/e;

    if-nez v1, :cond_e

    new-instance v1, Lcom/google/firebase/messaging/e;

    invoke-direct {v1, p0}, Lcom/google/firebase/messaging/e;-><init>(Landroid/content/Context;)V

    sput-object v1, Lcom/google/firebase/messaging/FirebaseMessaging;->m:Lcom/google/firebase/messaging/e;

    :cond_e
    sget-object p0, Lcom/google/firebase/messaging/FirebaseMessaging;->m:Lcom/google/firebase/messaging/e;
    :try_end_10
    .catchall {:try_start_3 .. :try_end_10} :catchall_12

    monitor-exit v0

    return-object p0

    :catchall_12
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method public static declared-synchronized getInstance(Lcom/google/firebase/a;)Lcom/google/firebase/messaging/FirebaseMessaging;
    .registers 3
    .annotation build Landroidx/annotation/Keep;
    .end annotation

    const-class v0, Lcom/google/firebase/messaging/FirebaseMessaging;

    monitor-enter v0

    .line 1
    :try_start_3
    invoke-virtual {p0}, Lcom/google/firebase/a;->a()V

    iget-object p0, p0, Lcom/google/firebase/a;->d:Lv7/k;

    invoke-virtual {p0, v0}, Lv7/a;->a(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object p0

    .line 2
    check-cast p0, Lcom/google/firebase/messaging/FirebaseMessaging;

    const-string v1, "Firebase Messaging component is not present"

    invoke-static {p0, v1}, Lcom/google/android/gms/common/internal/d;->i(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_13
    .catchall {:try_start_3 .. :try_end_13} :catchall_15

    monitor-exit v0

    return-object p0

    :catchall_15
    move-exception p0

    monitor-exit v0

    throw p0
.end method


# virtual methods
.method public a()Ljava/lang/String;
    .registers 8

    iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->b:Ld8/a;

    if-eqz v0, :cond_18

    :try_start_4
    invoke-interface {v0}, Ld8/a;->a()Ln6/i;

    move-result-object v0

    invoke-static {v0}, Ln6/l;->a(Ln6/i;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;
    :try_end_e
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_4 .. :try_end_e} :catch_11
    .catch Ljava/lang/InterruptedException; {:try_start_4 .. :try_end_e} :catch_f

    return-object v0

    :catch_f
    move-exception v0

    goto :goto_12

    :catch_11
    move-exception v0

    :goto_12
    new-instance v1, Ljava/io/IOException;

    invoke-direct {v1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V

    throw v1

    :cond_18
    invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging;->e()Lcom/google/firebase/messaging/e$a;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->i(Lcom/google/firebase/messaging/e$a;)Z

    move-result v1

    if-nez v1, :cond_25

    iget-object v0, v0, Lcom/google/firebase/messaging/e$a;->a:Ljava/lang/String;

    return-object v0

    :cond_25
    iget-object v1, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->a:Lcom/google/firebase/a;

    invoke-static {v1}, Lcom/google/firebase/messaging/b;->b(Lcom/google/firebase/a;)Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->f:Lcom/google/firebase/messaging/c;

    .line 1
    monitor-enter v2

    :try_start_2e
    iget-object v3, v2, Lcom/google/firebase/messaging/c;->b:Ljava/util/Map;

    invoke-interface {v3, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ln6/i;

    const/4 v4, 0x3

    if-eqz v3, :cond_5e

    const-string v0, "FirebaseMessaging"

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

    move-result v0

    if-eqz v0, :cond_5c

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

    move-result-object v0

    const-string v1, "Joining ongoing request for: "

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

    move-result v4

    if-eqz v4, :cond_52

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

    move-result-object v0

    goto :goto_57

    :cond_52
    new-instance v0, Ljava/lang/String;

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

    :goto_57
    const-string v1, "FirebaseMessaging"

    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_5c
    .catchall {:try_start_2e .. :try_end_5c} :catchall_c5

    :cond_5c
    :goto_5c
    monitor-exit v2

    goto :goto_b5

    :cond_5e
    :try_start_5e
    const-string v3, "FirebaseMessaging"

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

    move-result v3

    if-eqz v3, :cond_81

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

    move-result-object v3

    const-string v4, "Making new request for: "

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

    move-result v5

    if-eqz v5, :cond_77

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

    move-result-object v3

    goto :goto_7c

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

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

    :goto_7c
    const-string v4, "FirebaseMessaging"

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

    .line 2
    :cond_81
    iget-object v3, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->e:Lk8/q;

    .line 3
    iget-object v4, v3, Lk8/q;->a:Lcom/google/firebase/a;

    invoke-static {v4}, Lcom/google/firebase/messaging/b;->b(Lcom/google/firebase/a;)Ljava/lang/String;

    move-result-object v4

    new-instance v5, Landroid/os/Bundle;

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

    const-string v6, "*"

    invoke-virtual {v3, v4, v6, v5}, Lk8/q;->c(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Ln6/i;

    move-result-object v4

    invoke-virtual {v3, v4}, Lk8/q;->a(Ln6/i;)Ln6/i;

    move-result-object v3

    .line 4
    sget-object v4, Lk8/k;->r:Lk8/k;

    new-instance v5, Lk8/l;

    const/4 v6, 0x0

    invoke-direct {v5, p0, v1, v0, v6}, Lk8/l;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;Ljava/lang/String;Lcom/google/firebase/messaging/e$a;I)V

    invoke-virtual {v3, v4, v5}, Ln6/i;->o(Ljava/util/concurrent/Executor;Ln6/h;)Ln6/i;

    move-result-object v0

    .line 5
    iget-object v3, v2, Lcom/google/firebase/messaging/c;->a:Ljava/util/concurrent/Executor;

    new-instance v4, Lz5/ll0;

    invoke-direct {v4, v2, v1}, Lz5/ll0;-><init>(Lcom/google/firebase/messaging/c;Ljava/lang/String;)V

    invoke-virtual {v0, v3, v4}, Ln6/i;->g(Ljava/util/concurrent/Executor;Ln6/a;)Ln6/i;

    move-result-object v3

    iget-object v0, v2, Lcom/google/firebase/messaging/c;->b:Ljava/util/Map;

    invoke-interface {v0, v1, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_b4
    .catchall {:try_start_5e .. :try_end_b4} :catchall_c5

    goto :goto_5c

    .line 6
    :goto_b5
    :try_start_b5
    invoke-static {v3}, Ln6/l;->a(Ln6/i;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;
    :try_end_bb
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_b5 .. :try_end_bb} :catch_be
    .catch Ljava/lang/InterruptedException; {:try_start_b5 .. :try_end_bb} :catch_bc

    return-object v0

    :catch_bc
    move-exception v0

    goto :goto_bf

    :catch_be
    move-exception v0

    :goto_bf
    new-instance v1, Ljava/io/IOException;

    invoke-direct {v1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V

    throw v1

    :catchall_c5
    move-exception v0

    .line 7
    monitor-exit v2

    throw v0
.end method

.method public b(Ljava/lang/Runnable;J)V
    .registers 8

    const-class v0, Lcom/google/firebase/messaging/FirebaseMessaging;

    monitor-enter v0

    :try_start_3
    sget-object v1, Lcom/google/firebase/messaging/FirebaseMessaging;->o:Ljava/util/concurrent/ScheduledExecutorService;

    if-nez v1, :cond_16

    new-instance v1, Ljava/util/concurrent/ScheduledThreadPoolExecutor;

    new-instance v2, Lv5/a;

    const-string v3, "TAG"

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

    const/4 v3, 0x1

    invoke-direct {v1, v3, v2}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V

    sput-object v1, Lcom/google/firebase/messaging/FirebaseMessaging;->o:Ljava/util/concurrent/ScheduledExecutorService;

    :cond_16
    sget-object v1, Lcom/google/firebase/messaging/FirebaseMessaging;->o:Ljava/util/concurrent/ScheduledExecutorService;

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

    invoke-interface {v1, p1, p2, p3, v2}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;

    monitor-exit v0

    return-void

    :catchall_1f
    move-exception p1

    monitor-exit v0
    :try_end_21
    .catchall {:try_start_3 .. :try_end_21} :catchall_1f

    throw p1
.end method

.method public final d()Ljava/lang/String;
    .registers 3

    iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->a:Lcom/google/firebase/a;

    .line 1
    invoke-virtual {v0}, Lcom/google/firebase/a;->a()V

    iget-object v0, v0, Lcom/google/firebase/a;->b:Ljava/lang/String;

    const-string v1, "[DEFAULT]"

    .line 2
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_12

    const-string v0, ""

    goto :goto_18

    :cond_12
    iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->a:Lcom/google/firebase/a;

    invoke-virtual {v0}, Lcom/google/firebase/a;->c()Ljava/lang/String;

    move-result-object v0

    :goto_18
    return-object v0
.end method

.method public e()Lcom/google/firebase/messaging/e$a;
    .registers 5

    iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->d:Landroid/content/Context;

    invoke-static {v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->c(Landroid/content/Context;)Lcom/google/firebase/messaging/e;

    move-result-object v0

    invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging;->d()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->a:Lcom/google/firebase/a;

    invoke-static {v2}, Lcom/google/firebase/messaging/b;->b(Lcom/google/firebase/a;)Ljava/lang/String;

    move-result-object v2

    .line 1
    monitor-enter v0

    :try_start_11
    iget-object v3, v0, Lcom/google/firebase/messaging/e;->a:Landroid/content/SharedPreferences;

    invoke-virtual {v0, v1, v2}, Lcom/google/firebase/messaging/e;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-interface {v3, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/google/firebase/messaging/e$a;->b(Ljava/lang/String;)Lcom/google/firebase/messaging/e$a;

    move-result-object v1
    :try_end_20
    .catchall {:try_start_11 .. :try_end_20} :catchall_22

    monitor-exit v0

    return-object v1

    :catchall_22
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method public declared-synchronized f(Z)V
    .registers 2

    monitor-enter p0

    :try_start_1
    iput-boolean p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->k:Z
    :try_end_3
    .catchall {:try_start_1 .. :try_end_3} :catchall_5

    monitor-exit p0

    return-void

    :catchall_5
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public final g()V
    .registers 3

    iget-object v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->b:Ld8/a;

    if-eqz v0, :cond_8

    invoke-interface {v0}, Ld8/a;->c()Ljava/lang/String;

    return-void

    :cond_8
    invoke-virtual {p0}, Lcom/google/firebase/messaging/FirebaseMessaging;->e()Lcom/google/firebase/messaging/e$a;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/google/firebase/messaging/FirebaseMessaging;->i(Lcom/google/firebase/messaging/e$a;)Z

    move-result v0

    if-eqz v0, :cond_21

    .line 1
    monitor-enter p0

    :try_start_13
    iget-boolean v0, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->k:Z

    if-nez v0, :cond_1c

    const-wide/16 v0, 0x0

    invoke-virtual {p0, v0, v1}, Lcom/google/firebase/messaging/FirebaseMessaging;->h(J)V
    :try_end_1c
    .catchall {:try_start_13 .. :try_end_1c} :catchall_1e

    :cond_1c
    monitor-exit p0

    return-void

    :catchall_1e
    move-exception v0

    monitor-exit p0

    throw v0

    :cond_21
    return-void
.end method

.method public declared-synchronized h(J)V
    .registers 7

    monitor-enter p0

    const-wide/16 v0, 0x1e

    add-long v2, p1, p1

    :try_start_5
    invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v0

    sget-wide v2, Lcom/google/firebase/messaging/FirebaseMessaging;->l:J

    invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v0

    new-instance v2, Lcom/google/firebase/messaging/f;

    invoke-direct {v2, p0, v0, v1}, Lcom/google/firebase/messaging/f;-><init>(Lcom/google/firebase/messaging/FirebaseMessaging;J)V

    invoke-virtual {p0, v2, p1, p2}, Lcom/google/firebase/messaging/FirebaseMessaging;->b(Ljava/lang/Runnable;J)V

    const/4 p1, 0x1

    iput-boolean p1, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->k:Z
    :try_end_1a
    .catchall {:try_start_5 .. :try_end_1a} :catchall_1c

    monitor-exit p0

    return-void

    :catchall_1c
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public i(Lcom/google/firebase/messaging/e$a;)Z
    .registers 10

    const/4 v0, 0x1

    if-eqz p1, :cond_27

    iget-object v1, p0, Lcom/google/firebase/messaging/FirebaseMessaging;->j:Lcom/google/firebase/messaging/b;

    invoke-virtual {v1}, Lcom/google/firebase/messaging/b;->a()Ljava/lang/String;

    move-result-object v1

    .line 1
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    iget-wide v4, p1, Lcom/google/firebase/messaging/e$a;->c:J

    sget-wide v6, Lcom/google/firebase/messaging/e$a;->d:J

    add-long/2addr v4, v6

    cmp-long v2, v2, v4

    const/4 v3, 0x0

    if-gtz v2, :cond_22

    iget-object p1, p1, Lcom/google/firebase/messaging/e$a;->b:Ljava/lang/String;

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

    move-result p1

    if-nez p1, :cond_20

    goto :goto_22

    :cond_20
    move p1, v3

    goto :goto_23

    :cond_22
    :goto_22
    move p1, v0

    :goto_23
    if-eqz p1, :cond_26

    goto :goto_27

    :cond_26
    return v3

    :cond_27
    :goto_27
    return v0
.end method
