608 lines
16 KiB
Smali
608 lines
16 KiB
Smali
.class public final Lcom/google/firebase/iid/ad;
|
|
.super Ljava/lang/Object;
|
|
.source "com.google.firebase:firebase-iid@@20.0.0"
|
|
|
|
# interfaces
|
|
.implements Landroid/content/ServiceConnection;
|
|
|
|
|
|
# instance fields
|
|
.field private final aGG:Landroid/content/Context;
|
|
|
|
.field private final aRT:Landroid/content/Intent;
|
|
|
|
.field private final aRU:Ljava/util/Queue;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Queue<",
|
|
"Lcom/google/firebase/iid/ag;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private aRV:Lcom/google/firebase/iid/ab;
|
|
|
|
.field private final aRi:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
.field private zzf:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
new-instance v0, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
|
|
|
|
new-instance v1, Lcom/google/android/gms/common/util/a/a;
|
|
|
|
const-string v2, "Firebase-FirebaseInstanceIdServiceConnection"
|
|
|
|
invoke-direct {v1, v2}, Lcom/google/android/gms/common/util/a/a;-><init>(Ljava/lang/String;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v2, v1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/google/firebase/iid/ad;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/ArrayDeque;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayDeque;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/iid/ad;->aGG:Landroid/content/Context;
|
|
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
invoke-direct {p1, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object p2, p0, Lcom/google/firebase/iid/ad;->aGG:Landroid/content/Context;
|
|
|
|
invoke-virtual {p2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/iid/ad;->aRT:Landroid/content/Intent;
|
|
|
|
iput-object p3, p0, Lcom/google/firebase/iid/ad;->aRi:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final pE()V
|
|
.locals 1
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
invoke-interface {v0}, Ljava/util/Queue;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/firebase/iid/ag;
|
|
|
|
invoke-virtual {v0}, Lcom/google/firebase/iid/ag;->zza()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final declared-synchronized zza()V
|
|
.locals 6
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const-string v2, "flush queue called"
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
invoke-interface {v0}, Ljava/util/Queue;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_a
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const-string v2, "found intent to be delivered"
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRV:Lcom/google/firebase/iid/ab;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRV:Lcom/google/firebase/iid/ab;
|
|
|
|
invoke-virtual {v0}, Lcom/google/firebase/iid/ab;->isBinderAlive()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const-string v2, "binder is alive, sending the intent."
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/firebase/iid/ag;
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/iid/ad;->aRV:Lcom/google/firebase/iid/ab;
|
|
|
|
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {}, Landroid/os/Process;->myUid()I
|
|
|
|
move-result v4
|
|
|
|
if-ne v3, v4, :cond_4
|
|
|
|
const-string v3, "FirebaseInstanceId"
|
|
|
|
invoke-static {v3, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
const-string v3, "FirebaseInstanceId"
|
|
|
|
const-string v4, "service received new intent via bind strategy"
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_3
|
|
iget-object v2, v2, Lcom/google/firebase/iid/ab;->aRS:Lcom/google/firebase/iid/ae;
|
|
|
|
iget-object v3, v0, Lcom/google/firebase/iid/ag;->aRW:Landroid/content/Intent;
|
|
|
|
invoke-interface {v2, v3}, Lcom/google/firebase/iid/ae;->e(Landroid/content/Intent;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {}, Lcom/google/firebase/iid/a;->Ae()Ljava/util/concurrent/Executor;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Lcom/google/firebase/iid/aa;
|
|
|
|
invoke-direct {v4, v0}, Lcom/google/firebase/iid/aa;-><init>(Lcom/google/firebase/iid/ag;)V
|
|
|
|
invoke-virtual {v2, v3, v4}, Lcom/google/android/gms/tasks/Task;->a(Ljava/util/concurrent/Executor;Lcom/google/android/gms/tasks/c;)Lcom/google/android/gms/tasks/Task;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
new-instance v0, Ljava/lang/SecurityException;
|
|
|
|
const-string v1, "Binding only allowed within app"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
iget-boolean v3, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
|
|
if-nez v3, :cond_6
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
const/4 v3, 0x0
|
|
|
|
:goto_1
|
|
const/16 v4, 0x27
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5, v4}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v4, "binder is dead. start connection? "
|
|
|
|
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_7
|
|
iget-boolean v0, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
|
|
if-nez v0, :cond_9
|
|
|
|
iput-boolean v2, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:try_start_1
|
|
invoke-static {}, Lcom/google/android/gms/common/stats/a;->ni()Lcom/google/android/gms/common/stats/a;
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aGG:Landroid/content/Context;
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/iid/ad;->aRT:Landroid/content/Intent;
|
|
|
|
const/16 v3, 0x41
|
|
|
|
invoke-static {v0, v2, p0, v3}, Lcom/google/android/gms/common/stats/a;->b(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
|
|
move-result v0
|
|
:try_end_1
|
|
.catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_8
|
|
:try_start_2
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const-string v2, "binding to the service failed"
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
:try_end_2
|
|
.catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
:try_start_3
|
|
const-string v2, "FirebaseInstanceId"
|
|
|
|
const-string v3, "Exception while binding the service"
|
|
|
|
invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:goto_2
|
|
iput-boolean v1, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
|
|
invoke-direct {p0}, Lcom/google/firebase/iid/ad;->pE()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
:cond_9
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_a
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
goto :goto_4
|
|
|
|
:goto_3
|
|
throw v0
|
|
|
|
:goto_4
|
|
goto :goto_3
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final declared-synchronized a(Landroid/content/Intent;Landroid/content/BroadcastReceiver$PendingResult;)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const-string v1, "new intent queued in the bind-strategy delivery"
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/firebase/iid/ad;->aRU:Ljava/util/Queue;
|
|
|
|
new-instance v1, Lcom/google/firebase/iid/ag;
|
|
|
|
iget-object v2, p0, Lcom/google/firebase/iid/ad;->aRi:Ljava/util/concurrent/ScheduledExecutorService;
|
|
|
|
invoke-direct {v1, p1, p2, v2}, Lcom/google/firebase/iid/ag;-><init>(Landroid/content/Intent;Landroid/content/BroadcastReceiver$PendingResult;Ljava/util/concurrent/ScheduledExecutorService;)V
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-direct {p0}, Lcom/google/firebase/iid/ad;->zza()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final declared-synchronized onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
add-int/lit8 v1, v1, 0x14
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v1, "onServiceConnected: "
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/google/firebase/iid/ad;->zzf:Z
|
|
|
|
instance-of p1, p2, Lcom/google/firebase/iid/ab;
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
const-string p1, "FirebaseInstanceId"
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x1c
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v0, "Invalid service connection: "
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
invoke-direct {p0}, Lcom/google/firebase/iid/ad;->pE()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:try_start_1
|
|
check-cast p2, Lcom/google/firebase/iid/ab;
|
|
|
|
iput-object p2, p0, Lcom/google/firebase/iid/ad;->aRV:Lcom/google/firebase/iid/ab;
|
|
|
|
invoke-direct {p0}, Lcom/google/firebase/iid/ad;->zza()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
|
|
.locals 3
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
add-int/lit8 v1, v1, 0x17
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v1, "onServiceDisconnected: "
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/google/firebase/iid/ad;->zza()V
|
|
|
|
return-void
|
|
.end method
|