granularity level: instruction
.class final Lcom/google/android/gms/cloudmessaging/zzm;
.super Ljava/lang/Object;
.source "com.google.android.gms:play-services-cloud-messaging@@17.0.0"
.implements Landroid/content/ServiceConnection;
.field zza:I
.field final zzb:Landroid/os/Messenger;
.field zzc:Lcom/google/android/gms/cloudmessaging/zzn;
.field final zzd:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Lcom/google/android/gms/cloudmessaging/zzp<",
"*>;>;"
}
.end annotation
.end field
.field final zze:Landroid/util/SparseArray;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroid/util/SparseArray<",
"Lcom/google/android/gms/cloudmessaging/zzp<",
"*>;>;"
}
.end annotation
.end field
.field final synthetic zzf:Lcom/google/android/gms/cloudmessaging/zzs;
.method synthetic constructor <init>(Lcom/google/android/gms/cloudmessaging/zzs;Lcom/google/android/gms/cloudmessaging/zzl;)V
.locals 2
iput-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 p1, 0x0
iput p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
new-instance p1, Landroid/os/Messenger;
new-instance p2, Lcom/google/android/gms/internal/cloudmessaging/zzf;
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v0
new-instance v1, Lcom/google/android/gms/cloudmessaging/zzf;
invoke-direct {v1, p0}, Lcom/google/android/gms/cloudmessaging/zzf;-><init>(Lcom/google/android/gms/cloudmessaging/zzm;)V
invoke-direct {p2, v0, v1}, Lcom/google/android/gms/internal/cloudmessaging/zzf;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;)V
invoke-direct {p1, p2}, Landroid/os/Messenger;-><init>(Landroid/os/Handler;)V
iput-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzb:Landroid/os/Messenger;
new-instance p1, Ljava/util/ArrayDeque;
invoke-direct {p1}, Ljava/util/ArrayDeque;-><init>()V
iput-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
new-instance p1, Landroid/util/SparseArray;
invoke-direct {p1}, Landroid/util/SparseArray;-><init>()V
iput-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
return-void
.end method
.method public final onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
.locals 1
const-string p1, "MessengerIpcClient"
const/4 v0, 0x2
invoke-static {p1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_0
const-string v0, "Service connected"
invoke-static {p1, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {p1}, Lcom/google/android/gms/cloudmessaging/zzs;->zze(Lcom/google/android/gms/cloudmessaging/zzs;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object p1
new-instance v0, Lcom/google/android/gms/cloudmessaging/zzj;
invoke-direct {v0, p0, p2}, Lcom/google/android/gms/cloudmessaging/zzj;-><init>(Lcom/google/android/gms/cloudmessaging/zzm;Landroid/os/IBinder;)V
invoke-interface {p1, v0}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
return-void
.end method
.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
.locals 1
const-string p1, "MessengerIpcClient"
const/4 v0, 0x2
invoke-static {p1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_0
const-string v0, "Service disconnected"
invoke-static {p1, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {p1}, Lcom/google/android/gms/cloudmessaging/zzs;->zze(Lcom/google/android/gms/cloudmessaging/zzs;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object p1
new-instance v0, Lcom/google/android/gms/cloudmessaging/zzg;
invoke-direct {v0, p0}, Lcom/google/android/gms/cloudmessaging/zzg;-><init>(Lcom/google/android/gms/cloudmessaging/zzm;)V
invoke-interface {p1, v0}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
return-void
.end method
.method final declared-synchronized zza(ILjava/lang/String;)V
.locals 1
monitor-enter p0
const/4 v0, 0x0
:try_start_0
invoke-virtual {p0, p1, p2, v0}, Lcom/google/android/gms/cloudmessaging/zzm;->zzb(ILjava/lang/String;Ljava/lang/Throwable;)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 final declared-synchronized zzb(ILjava/lang/String;Ljava/lang/Throwable;)V
.locals 5
monitor-enter p0
:try_start_0
const-string v0, "MessengerIpcClient"
const/4 v1, 0x3
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_1
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v2, "Disconnected: "
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v3
if-eqz v3, :cond_0
invoke-virtual {v2, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
goto :goto_0
:cond_0
new-instance v0, Ljava/lang/String;
invoke-direct {v0, v2}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_0
const-string v2, "MessengerIpcClient"
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_1
iget v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_7
const/4 v2, 0x4
const/4 v3, 0x2
const/4 v4, 0x1
if-eq v0, v4, :cond_3
if-eq v0, v3, :cond_3
if-eq v0, v1, :cond_2
monitor-exit p0
return-void
:try_start_1
:cond_2
iput v2, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-void
:try_start_2
:cond_3
const-string v0, "MessengerIpcClient"
invoke-static {v0, v3}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_4
const-string v0, "MessengerIpcClient"
const-string v1, "Unbinding service"
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_4
iput v2, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
invoke-static {}, Lcom/google/android/gms/common/stats/ConnectionTracker;->getInstance()Lcom/google/android/gms/common/stats/ConnectionTracker;
move-result-object v0
iget-object v1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {v1}, Lcom/google/android/gms/cloudmessaging/zzs;->zza(Lcom/google/android/gms/cloudmessaging/zzs;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p0}, Lcom/google/android/gms/common/stats/ConnectionTracker;->unbindService(Landroid/content/Context;Landroid/content/ServiceConnection;)V
new-instance v0, Lcom/google/android/gms/cloudmessaging/zzq;
invoke-direct {v0, p1, p2, p3}, Lcom/google/android/gms/cloudmessaging/zzq;-><init>(ILjava/lang/String;Ljava/lang/Throwable;)V
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {p1}, Ljava/util/Queue;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_1
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result p2
if-eqz p2, :cond_5
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/google/android/gms/cloudmessaging/zzp;
invoke-virtual {p2, v0}, Lcom/google/android/gms/cloudmessaging/zzp;->zzc(Lcom/google/android/gms/cloudmessaging/zzq;)V
goto :goto_1
:cond_5
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {p1}, Ljava/util/Queue;->clear()V
const/4 p1, 0x0
:goto_2
iget-object p2, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {p2}, Landroid/util/SparseArray;->size()I
move-result p2
if-ge p1, p2, :cond_6
iget-object p2, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {p2, p1}, Landroid/util/SparseArray;->valueAt(I)Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/google/android/gms/cloudmessaging/zzp;
invoke-virtual {p2, v0}, Lcom/google/android/gms/cloudmessaging/zzp;->zzc(Lcom/google/android/gms/cloudmessaging/zzq;)V
add-int/lit8 p1, p1, 0x1
goto :goto_2
:cond_6
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {p1}, Landroid/util/SparseArray;->clear()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit p0
return-void
:try_start_3
:cond_7
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method final zzc()V
.locals 2
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {v0}, Lcom/google/android/gms/cloudmessaging/zzs;->zze(Lcom/google/android/gms/cloudmessaging/zzs;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
new-instance v1, Lcom/google/android/gms/cloudmessaging/zzh;
invoke-direct {v1, p0}, Lcom/google/android/gms/cloudmessaging/zzh;-><init>(Lcom/google/android/gms/cloudmessaging/zzm;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
return-void
.end method
.method final declared-synchronized zzd()V
.locals 2
monitor-enter p0
:try_start_0
iget v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
const/4 v1, 0x1
if-ne v0, v1, :cond_0
const-string v0, "Timed out while binding"
invoke-virtual {p0, v1, v0}, Lcom/google/android/gms/cloudmessaging/zzm;->zza(ILjava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:cond_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method final declared-synchronized zze(I)V
.locals 4
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {v0, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/android/gms/cloudmessaging/zzp;
if-eqz v0, :cond_0
new-instance v1, Ljava/lang/StringBuilder;
const/16 v2, 0x1f
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v2, "Timing out request: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, "MessengerIpcClient"
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v2, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {v1, p1}, Landroid/util/SparseArray;->remove(I)V
new-instance p1, Lcom/google/android/gms/cloudmessaging/zzq;
const/4 v1, 0x3
const-string v2, "Timed out waiting for response"
const/4 v3, 0x0
invoke-direct {p1, v1, v2, v3}, Lcom/google/android/gms/cloudmessaging/zzq;-><init>(ILjava/lang/String;Ljava/lang/Throwable;)V
invoke-virtual {v0, p1}, Lcom/google/android/gms/cloudmessaging/zzp;->zzc(Lcom/google/android/gms/cloudmessaging/zzq;)V
invoke-virtual {p0}, Lcom/google/android/gms/cloudmessaging/zzm;->zzf()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:cond_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method final declared-synchronized zzf()V
.locals 2
monitor-enter p0
:try_start_0
iget v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
const/4 v1, 0x2
if-ne v0, v1, :cond_1
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {v0}, Ljava/util/Queue;->isEmpty()Z
move-result v0
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zze:Landroid/util/SparseArray;
invoke-virtual {v0}, Landroid/util/SparseArray;->size()I
move-result v0
if-nez v0, :cond_1
const-string v0, "MessengerIpcClient"
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_0
const-string v0, "MessengerIpcClient"
const-string v1, "Finished handling requests, unbinding"
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
const/4 v0, 0x3
iput v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
invoke-static {}, Lcom/google/android/gms/common/stats/ConnectionTracker;->getInstance()Lcom/google/android/gms/common/stats/ConnectionTracker;
move-result-object v0
iget-object v1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {v1}, Lcom/google/android/gms/cloudmessaging/zzs;->zza(Lcom/google/android/gms/cloudmessaging/zzs;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p0}, Lcom/google/android/gms/common/stats/ConnectionTracker;->unbindService(Landroid/content/Context;Landroid/content/ServiceConnection;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:cond_1
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method final declared-synchronized zzg(Lcom/google/android/gms/cloudmessaging/zzp;)Z
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/android/gms/cloudmessaging/zzp<",
"*>;)Z"
}
.end annotation
monitor-enter p0
:try_start_0
iget v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x2
const/4 v2, 0x0
const/4 v3, 0x1
if-eqz v0, :cond_2
if-eq v0, v3, :cond_1
if-eq v0, v1, :cond_0
monitor-exit p0
return v2
:try_start_1
:cond_0
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
invoke-virtual {p0}, Lcom/google/android/gms/cloudmessaging/zzm;->zzc()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return v3
:try_start_2
:cond_1
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit p0
return v3
:try_start_3
:cond_2
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzd:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
iget p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
if-nez p1, :cond_3
const/4 p1, 0x1
goto :goto_0
:cond_3
const/4 p1, 0x0
:goto_0
invoke-static {p1}, Lcom/google/android/gms/common/internal/Preconditions;->checkState(Z)V
const-string p1, "MessengerIpcClient"
invoke-static {p1, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p1
if-eqz p1, :cond_4
const-string p1, "MessengerIpcClient"
const-string v0, "Starting bind to GmsCore"
invoke-static {p1, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_4
iput v3, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zza:I
new-instance p1, Landroid/content/Intent;
const-string v0, "com.google.android.c2dm.intent.REGISTER"
invoke-direct {p1, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v0, "com.google.android.gms"
invoke-virtual {p1, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:try_start_4
invoke-static {}, Lcom/google/android/gms/common/stats/ConnectionTracker;->getInstance()Lcom/google/android/gms/common/stats/ConnectionTracker;
move-result-object v0
iget-object v1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {v1}, Lcom/google/android/gms/cloudmessaging/zzs;->zza(Lcom/google/android/gms/cloudmessaging/zzs;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v0, v1, p1, p0, v3}, Lcom/google/android/gms/common/stats/ConnectionTracker;->bindService(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
if-nez p1, :cond_5
const-string p1, "Unable to bind to service"
invoke-virtual {p0, v2, p1}, Lcom/google/android/gms/cloudmessaging/zzm;->zza(ILjava/lang/String;)V
:try_end_4
.catch Ljava/lang/SecurityException; {:try_start_4 .. :try_end_4} :catch_0
.catchall {:try_start_4 .. :try_end_4} :catchall_0
goto :goto_1
:try_start_5
:cond_5
iget-object p1, p0, Lcom/google/android/gms/cloudmessaging/zzm;->zzf:Lcom/google/android/gms/cloudmessaging/zzs;
invoke-static {p1}, Lcom/google/android/gms/cloudmessaging/zzs;->zze(Lcom/google/android/gms/cloudmessaging/zzs;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object p1
new-instance v0, Lcom/google/android/gms/cloudmessaging/zzi;
invoke-direct {v0, p0}, Lcom/google/android/gms/cloudmessaging/zzi;-><init>(Lcom/google/android/gms/cloudmessaging/zzm;)V
const-wide/16 v1, 0x1e
sget-object v4, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface {p1, v0, v1, v2, v4}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
goto :goto_1
:catch_0
move-exception p1
const-string v0, "Unable to bind to service"
invoke-virtual {p0, v2, v0, p1}, Lcom/google/android/gms/cloudmessaging/zzm;->zzb(ILjava/lang/String;Ljava/lang/Throwable;)V
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
:goto_1
monitor-exit p0
return v3
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method