granularity level: instruction
.class public Lcom/google/firebase/messaging/FirebaseMessagingService;
.super Lcom/google/firebase/messaging/EnhancedIntentService;
.source "FirebaseMessagingService.java"
.field public static final ACTION_DIRECT_BOOT_REMOTE_INTENT:Ljava/lang/String; = "com.google.firebase.messaging.RECEIVE_DIRECT_BOOT"
.field static final ACTION_NEW_TOKEN:Ljava/lang/String; = "com.google.firebase.messaging.NEW_TOKEN"
.field static final ACTION_REMOTE_INTENT:Ljava/lang/String; = "com.google.android.c2dm.intent.RECEIVE"
.field static final EXTRA_TOKEN:Ljava/lang/String; = "token"
.field private static final RECENTLY_RECEIVED_MESSAGE_IDS_MAX_SIZE:I = 0xa
.field private static final recentlyReceivedMessageIds:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.method static constructor <clinit>()V
.locals 2
new-instance v0, Ljava/util/ArrayDeque;
const/16 v1, 0xa
invoke-direct {v0, v1}, Ljava/util/ArrayDeque;-><init>(I)V
sput-object v0, Lcom/google/firebase/messaging/FirebaseMessagingService;->recentlyReceivedMessageIds:Ljava/util/Queue;
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lcom/google/firebase/messaging/EnhancedIntentService;-><init>()V
return-void
.end method
.method private alreadyReceivedMessage(Ljava/lang/String;)Z
.locals 4
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
const/4 v1, 0x0
sget-object v0, Lcom/google/firebase/messaging/FirebaseMessagingService;->recentlyReceivedMessageIds:Ljava/util/Queue;
invoke-interface {v0, p1}, Ljava/util/Queue;->contains(Ljava/lang/Object;)Z
move-result v2
invoke-interface {v0}, Ljava/util/Queue;->size()I
move-result v2
const/16 v3, 0xa
invoke-interface {v0, p1}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
return v1
.end method
.method private dispatchMessage(Landroid/content/Intent;)V
.locals 4
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object v0
const-string v1, "androidx.content.wakelockid"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V
invoke-static {v0}, Lcom/google/firebase/messaging/NotificationParams;->isNotification(Landroid/os/Bundle;)Z
move-result v1
if-eqz v1, :cond_2
new-instance v1, Lcom/google/firebase/messaging/NotificationParams;
invoke-direct {v1, v0}, Lcom/google/firebase/messaging/NotificationParams;-><init>(Landroid/os/Bundle;)V
invoke-static {}, Lcom/google/firebase/messaging/FcmExecutors;->newNetworkIOExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v2
new-instance v3, Lcom/google/firebase/messaging/DisplayNotification;
invoke-direct {v3, p0, v1, v2}, Lcom/google/firebase/messaging/DisplayNotification;-><init>(Landroid/content/Context;Lcom/google/firebase/messaging/NotificationParams;Ljava/util/concurrent/ExecutorService;)V
invoke-virtual {v3}, Lcom/google/firebase/messaging/DisplayNotification;->handleNotification()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v2}, Ljava/util/concurrent/ExecutorService;->shutdown()V
return-void
:cond_1
invoke-interface {v2}, Ljava/util/concurrent/ExecutorService;->shutdown()V
invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->shouldUploadScionMetrics(Landroid/content/Intent;)Z
move-result v1
if-eqz v1, :cond_2
invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->logNotificationForeground(Landroid/content/Intent;)V
:cond_2
new-instance p1, Lcom/google/firebase/messaging/RemoteMessage;
invoke-direct {p1, v0}, Lcom/google/firebase/messaging/RemoteMessage;-><init>(Landroid/os/Bundle;)V
invoke-virtual {p0, p1}, Lcom/google/firebase/messaging/FirebaseMessagingService;->onMessageReceived(Lcom/google/firebase/messaging/RemoteMessage;)V
return-void
.end method
.method private getMessageId(Landroid/content/Intent;)Ljava/lang/String;
.locals 1
const/4 v0, 0x0
return-object v0
.end method
.method private handleMessageIntent(Landroid/content/Intent;)V
.locals 1
const-string v0, "google.message_id"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Lcom/google/firebase/messaging/FirebaseMessagingService;->alreadyReceivedMessage(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
invoke-direct {p0, p1}, Lcom/google/firebase/messaging/FirebaseMessagingService;->passMessageIntentToSdk(Landroid/content/Intent;)V
:cond_0
return-void
.end method
.method private passMessageIntentToSdk(Landroid/content/Intent;)V
.locals 4
const-string v0, "message_type"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v1, "gcm"
if-nez v0, :cond_0
move-object v0, v1
:cond_0
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
const/4 v2, -0x1
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
move-result v3
sparse-switch v3, :sswitch_data_0
goto :goto_0
:sswitch_2
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
const/4 v2, 0x1
:goto_0
packed-switch v2, :pswitch_data_0
:pswitch_2
invoke-static {p1}, Lcom/google/firebase/messaging/MessagingAnalytics;->logNotificationReceived(Landroid/content/Intent;)V
invoke-direct {p0, p1}, Lcom/google/firebase/messaging/FirebaseMessagingService;->dispatchMessage(Landroid/content/Intent;)V
:goto_1
return-void
:pswitch_data_0
.packed-switch 0x0
:pswitch_2
:pswitch_2
:pswitch_2
:pswitch_2
.end packed-switch
:sswitch_data_0
.sparse-switch
0x18f11 -> :sswitch_2
.end sparse-switch
.end method
.method static resetForTesting()V
.locals 1
return-void
.end method
.method protected getStartCommandIntent(Landroid/content/Intent;)Landroid/content/Intent;
.locals 0
invoke-static {}, Lcom/google/firebase/messaging/ServiceStarter;->getInstance()Lcom/google/firebase/messaging/ServiceStarter;
move-result-object p1
invoke-virtual {p1}, Lcom/google/firebase/messaging/ServiceStarter;->getMessagingEvent()Landroid/content/Intent;
move-result-object p1
return-object p1
.end method
.method public handleIntent(Landroid/content/Intent;)V
.locals 2
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
const-string v1, "com.google.android.c2dm.intent.RECEIVE"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_2
const-string v1, "com.google.firebase.messaging.RECEIVE_DIRECT_BOOT"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
const-string v1, "com.google.firebase.messaging.NEW_TOKEN"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
const-string v0, "token"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p0, p1}, Lcom/google/firebase/messaging/FirebaseMessagingService;->onNewToken(Ljava/lang/String;)V
goto :goto_1
:cond_2
:goto_0
invoke-direct {p0, p1}, Lcom/google/firebase/messaging/FirebaseMessagingService;->handleMessageIntent(Landroid/content/Intent;)V
:goto_1
return-void
.end method
.method public onDeletedMessages()V
.locals 0
return-void
.end method
.method public onMessageReceived(Lcom/google/firebase/messaging/RemoteMessage;)V
.locals 0
return-void
.end method
.method public onMessageSent(Ljava/lang/String;)V
.locals 0
return-void
.end method
.method public onNewToken(Ljava/lang/String;)V
.locals 0
return-void
.end method
.method public onSendError(Ljava/lang/String;Ljava/lang/Exception;)V
.locals 0
return-void
.end method