granularity level: instruction
.class public abstract Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;
.super Landroid/content/BroadcastReceiver;
.source "com.google.android.gms:play-services-cloud-messaging@@17.0.0"
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver$IntentKeys;,
Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver$IntentActionKeys;
}
.end annotation
.field private final zza:Ljava/util/concurrent/ExecutorService;
.method public constructor <init>()V
.locals 9
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
invoke-static {}, Lcom/google/android/gms/internal/cloudmessaging/zze;->zza()Lcom/google/android/gms/internal/cloudmessaging/zzb;
new-instance v7, Lcom/google/android/gms/common/util/concurrent/NamedThreadFactory;
const-string v0, "firebase-iid-executor"
invoke-direct {v7, v0}, Lcom/google/android/gms/common/util/concurrent/NamedThreadFactory;-><init>(Ljava/lang/String;)V
new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;
sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
const/4 v1, 0x1
const/4 v2, 0x1
const-wide/16 v3, 0x3c
move-object v0, v8
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
const/4 v0, 0x1
invoke-virtual {v8, v0}, Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut(Z)V
invoke-static {v8}, Ljava/util/concurrent/Executors;->unconfigurableExecutorService(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;
move-result-object v0
iput-object v0, p0, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->zza:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method private final zzb(Landroid/content/Context;Landroid/content/Intent;)I
.locals 3
invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object v0
if-nez v0, :cond_0
const/16 p1, 0x1f4
return p1
:cond_0
const-string v0, "google.message_id"
invoke-virtual {p2, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_1
const/4 v0, 0x0
invoke-static {v0}, Lcom/google/android/gms/tasks/Tasks;->forResult(Ljava/lang/Object;)Lcom/google/android/gms/tasks/Task;
move-result-object v0
goto :goto_0
:cond_1
new-instance v2, Landroid/os/Bundle;
invoke-direct {v2}, Landroid/os/Bundle;-><init>()V
invoke-virtual {v2, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
invoke-static {p1}, Lcom/google/android/gms/cloudmessaging/zzs;->zzb(Landroid/content/Context;)Lcom/google/android/gms/cloudmessaging/zzs;
move-result-object v0
const/4 v1, 0x2
invoke-virtual {v0, v1, v2}, Lcom/google/android/gms/cloudmessaging/zzs;->zzc(ILandroid/os/Bundle;)Lcom/google/android/gms/tasks/Task;
move-result-object v0
:goto_0
new-instance v1, Lcom/google/android/gms/cloudmessaging/CloudMessage;
invoke-direct {v1, p2}, Lcom/google/android/gms/cloudmessaging/CloudMessage;-><init>(Landroid/content/Intent;)V
invoke-virtual {p0, p1, v1}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->onMessageReceive(Landroid/content/Context;Lcom/google/android/gms/cloudmessaging/CloudMessage;)I
move-result p1
:try_start_0
sget-object p2, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x1
invoke-virtual {p2, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v1
sget-object p2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-static {v0, v1, v2, p2}, Lcom/google/android/gms/tasks/Tasks;->await(Lcom/google/android/gms/tasks/Task;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/util/concurrent/TimeoutException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_2
:catch_0
move-exception p2
goto :goto_1
:catch_1
move-exception p2
goto :goto_1
:catch_2
move-exception p2
:goto_1
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
new-instance v1, Ljava/lang/StringBuilder;
add-int/lit8 v0, v0, 0x14
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "Message ack failed: "
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
const-string v0, "CloudMessagingReceiver"
invoke-static {v0, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:goto_2
return p1
.end method
.method private final zzc(Landroid/content/Context;Landroid/content/Intent;)I
.locals 3
const-string v0, "pending_intent"
invoke-virtual {p2, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v1
check-cast v1, Landroid/app/PendingIntent;
const-string v2, "CloudMessagingReceiver"
if-eqz v1, :cond_0
:try_start_0
invoke-virtual {v1}, Landroid/app/PendingIntent;->send()V
:try_end_0
.catch Landroid/app/PendingIntent$CanceledException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
const-string v1, "Notification pending intent canceled"
invoke-static {v2, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:goto_0
:cond_0
invoke-virtual {p2}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object v1
if-eqz v1, :cond_1
invoke-virtual {v1, v0}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V
goto :goto_1
:cond_1
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
:goto_1
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object p2
const-string v0, "com.google.firebase.messaging.NOTIFICATION_DISMISS"
invoke-virtual {v0, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_2
invoke-virtual {p0, p1, v1}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->onNotificationDismissed(Landroid/content/Context;Landroid/os/Bundle;)V
const/4 p1, -0x1
return p1
:cond_2
const-string p1, "Unknown notification action"
invoke-static {v2, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
const/16 p1, 0x1f4
return p1
.end method
.method protected getBroadcastExecutor()Ljava/util/concurrent/Executor;
.locals 1
iget-object v0, p0, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->zza:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method protected abstract onMessageReceive(Landroid/content/Context;Lcom/google/android/gms/cloudmessaging/CloudMessage;)I
.end method
.method protected onNotificationDismissed(Landroid/content/Context;Landroid/os/Bundle;)V
.locals 0
return-void
.end method
.method public final onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
if-nez p2, :cond_0
return-void
:cond_0
invoke-virtual {p0}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->isOrderedBroadcast()Z
move-result v4
invoke-virtual {p0}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->goAsync()Landroid/content/BroadcastReceiver$PendingResult;
move-result-object v5
invoke-virtual {p0}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->getBroadcastExecutor()Ljava/util/concurrent/Executor;
move-result-object v6
new-instance v7, Lcom/google/android/gms/cloudmessaging/zze;
move-object v0, v7
move-object v1, p0
move-object v2, p2
move-object v3, p1
invoke-direct/range {v0 .. v5}, Lcom/google/android/gms/cloudmessaging/zze;-><init>(Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;Landroid/content/Intent;Landroid/content/Context;ZLandroid/content/BroadcastReceiver$PendingResult;)V
invoke-interface {v6, v7}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
return-void
.end method
.method public final synthetic zza(Landroid/content/Intent;Landroid/content/Context;ZLandroid/content/BroadcastReceiver$PendingResult;)V
.locals 2
:try_start_0
const-string v0, "wrapped_intent"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
instance-of v1, v0, Landroid/content/Intent;
if-eqz v1, :cond_0
check-cast v0, Landroid/content/Intent;
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
invoke-direct {p0, p2, v0}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->zzc(Landroid/content/Context;Landroid/content/Intent;)I
move-result p1
goto :goto_1
:cond_1
invoke-direct {p0, p2, p1}, Lcom/google/android/gms/cloudmessaging/CloudMessagingReceiver;->zzb(Landroid/content/Context;Landroid/content/Intent;)I
move-result p1
:goto_1
if-eqz p3, :cond_2
invoke-virtual {p4, p1}, Landroid/content/BroadcastReceiver$PendingResult;->setResultCode(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_2
invoke-virtual {p4}, Landroid/content/BroadcastReceiver$PendingResult;->finish()V
return-void
:catchall_0
move-exception p1
invoke-virtual {p4}, Landroid/content/BroadcastReceiver$PendingResult;->finish()V
throw p1
.end method