- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
813 lines
23 KiB
Smali
813 lines
23 KiB
Smali
.class public Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;
|
|
.super Landroidx/core/app/JobIntentService;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService$EnsEventFlags;,
|
|
Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService$PushIntentExtraKeys;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field protected static final JOB_ID:I = 0x15be
|
|
|
|
.field private static final LOG_TAG:Ljava/lang/String; = "FCMMessageService"
|
|
|
|
|
|
# instance fields
|
|
.field private pushManager:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 43
|
|
invoke-direct {p0}, Landroidx/core/app/JobIntentService;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static enqueueWork(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;)V
|
|
.locals 1
|
|
|
|
.line 72
|
|
:try_start_0
|
|
invoke-static {p1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 v0, 0x15be
|
|
|
|
.line 73
|
|
invoke-static {p0, p1, v0, p2}, Landroidx/core/app/JobIntentService;->enqueueWork(Landroid/content/Context;Ljava/lang/Class;ILandroid/content/Intent;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 77
|
|
invoke-virtual {p0}, Ljava/lang/Throwable;->printStackTrace()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private postNotification(Landroid/content/Context;Landroid/os/Bundle;)V
|
|
.locals 9
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"InlinedApi"
|
|
}
|
|
.end annotation
|
|
|
|
.line 145
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const/16 v1, 0x20
|
|
|
|
.line 146
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
.line 147
|
|
invoke-virtual {v0, p2}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
.line 148
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 150
|
|
invoke-virtual {p0}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->getBroadcastForwarderComponent()Landroid/content/ComponentName;
|
|
|
|
move-result-object v1
|
|
|
|
.line 152
|
|
invoke-virtual {p0}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->isInForeground()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 156
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
.line 157
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_0
|
|
const-string p1, "Broadcast listener for action \'com.ea.eadp.pushnotification.FORWARD_AS_ORDERED_BROADCAST\' was not found. Not sending broadcast"
|
|
|
|
new-array p2, v3, [Ljava/lang/Object;
|
|
|
|
.line 161
|
|
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_1
|
|
const-string v2, "pushId"
|
|
|
|
.line 166
|
|
invoke-virtual {p2, v2}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
.line 167
|
|
invoke-virtual {v2}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move v2, v3
|
|
|
|
:goto_0
|
|
const/16 v4, 0x80
|
|
|
|
.line 170
|
|
invoke-static {v4}, Lcom/ea/nimble/Utility;->getApplicationInfo(I)Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
.line 171
|
|
iget-object v5, v4, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
|
|
|
|
const-string v6, "com.ea.nimble.pushtng.channel.id"
|
|
|
|
invoke-virtual {v5, v6}, Landroid/os/BaseBundle;->containsKey(Ljava/lang/String;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
.line 173
|
|
iget-object v4, v4, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
|
|
|
|
invoke-virtual {v4, v6}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string v4, "nimble_default"
|
|
|
|
.line 176
|
|
:goto_1
|
|
new-instance v5, Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
invoke-direct {v5, p1, v4}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
const-string v4, "notification"
|
|
|
|
const-string v6, "do_not_collapse"
|
|
|
|
const-string v7, "collapse_key"
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
.line 180
|
|
invoke-virtual {p2, v7}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
if-eqz v8, :cond_4
|
|
|
|
.line 181
|
|
invoke-virtual {v8, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_4
|
|
|
|
.line 183
|
|
invoke-virtual {v0, v7, v8}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 185
|
|
:cond_4
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
.line 187
|
|
invoke-virtual {p0, v5, p2}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->customizeNotification(Landroidx/core/app/NotificationCompat$Builder;Landroid/os/Bundle;)V
|
|
|
|
.line 188
|
|
invoke-virtual {v5}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v0, v4, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const/high16 p2, 0xc000000
|
|
|
|
.line 189
|
|
invoke-static {p1, v2, v0, p2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "FCMMessageService"
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
.line 194
|
|
invoke-virtual {v5, p1}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
.line 197
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroid/app/PendingIntent;->send()V
|
|
:try_end_0
|
|
.catch Landroid/app/PendingIntent$CanceledException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 201
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "[CanceledException] Could not launch PendingIntent for PN "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-array v0, v3, [Ljava/lang/Object;
|
|
|
|
invoke-static {p2, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const-string p1, "Unable to query PendingIntent"
|
|
|
|
new-array v0, v3, [Ljava/lang/Object;
|
|
|
|
.line 206
|
|
invoke-static {p2, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
const-string v0, "Broadcast listener for action \'com.ea.eadp.pushnotification.FORWARD_AS_ORDERED_BROADCAST\' was not found. Not setting ContentIntent"
|
|
|
|
new-array v1, v3, [Ljava/lang/Object;
|
|
|
|
.line 216
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
.line 218
|
|
invoke-virtual {p0, v5, p2}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->customizeNotification(Landroidx/core/app/NotificationCompat$Builder;Landroid/os/Bundle;)V
|
|
|
|
.line 220
|
|
invoke-virtual {p1, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/app/NotificationManager;
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
.line 223
|
|
invoke-virtual {p2, v7}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
.line 224
|
|
invoke-virtual {p2, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_7
|
|
|
|
.line 227
|
|
invoke-virtual {v5}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, v3, v0}, Landroid/app/NotificationManager;->notify(Ljava/lang/String;ILandroid/app/Notification;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 231
|
|
:cond_7
|
|
invoke-virtual {v5}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, v2, p2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
const-string p1, "Notification Manager is not available or is inaccessible. Skipping Notification formatting."
|
|
|
|
new-array p2, v3, [Ljava/lang/Object;
|
|
|
|
.line 236
|
|
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public customizeNotification(Landroidx/core/app/NotificationCompat$Builder;Landroid/os/Bundle;)V
|
|
.locals 5
|
|
|
|
const-string v0, "alert"
|
|
|
|
.line 264
|
|
invoke-virtual {p2, v0}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 266
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
.line 267
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "app_name"
|
|
|
|
const-string v3, "string"
|
|
|
|
.line 270
|
|
invoke-virtual {v0, v2, v3, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
.line 271
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:try_start_0
|
|
const-string v3, "pn_icon"
|
|
|
|
const-string v4, "drawable"
|
|
|
|
.line 276
|
|
invoke-virtual {v0, v3, v4, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
.line 277
|
|
invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 281
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "PN NOT DISPLAYED: Unable to set application icon due to exception: "
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
const-string v3, "FCMMessageService"
|
|
|
|
invoke-static {v3, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
.line 285
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "android.permission.VIBRATE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x5
|
|
|
|
.line 290
|
|
:goto_1
|
|
invoke-virtual {p1, v2}, Landroidx/core/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Landroidx/core/app/NotificationCompat$BigTextStyle;
|
|
|
|
invoke-direct {v1}, Landroidx/core/app/NotificationCompat$BigTextStyle;-><init>()V
|
|
|
|
invoke-virtual {v1, p2}, Landroidx/core/app/NotificationCompat$BigTextStyle;->bigText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$BigTextStyle;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/core/app/NotificationCompat$Builder;->setStyle(Landroidx/core/app/NotificationCompat$Style;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/core/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setDefaults(I)Landroidx/core/app/NotificationCompat$Builder;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public displayNotification(Landroid/os/Bundle;)Z
|
|
.locals 0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getBroadcastForwarderComponent()Landroid/content/ComponentName;
|
|
.locals 5
|
|
|
|
.line 312
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 313
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v0
|
|
|
|
.line 314
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
const-string v2, "com.ea.eadp.pushnotification.FORWARD_AS_ORDERED_BROADCAST"
|
|
|
|
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 315
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v3, 0x21
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-lt v2, v3, :cond_0
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
.line 319
|
|
invoke-static {v2, v3}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService$$ExternalSyntheticApiModelOutline0;->m(J)Landroid/content/pm/PackageManager$ResolveInfoFlags;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService$$ExternalSyntheticApiModelOutline1;->m(Landroid/content/pm/PackageManager;Landroid/content/Intent;Landroid/content/pm/PackageManager$ResolveInfoFlags;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 324
|
|
:cond_0
|
|
invoke-virtual {v0, v1, v4}, Landroid/content/pm/PackageManager;->queryBroadcastReceivers(Landroid/content/Intent;I)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
.line 328
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 330
|
|
invoke-interface {v0, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/content/pm/ResolveInfo;
|
|
|
|
iget-object v0, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
|
|
|
|
.line 331
|
|
new-instance v1, Landroid/content/ComponentName;
|
|
|
|
iget-object v2, v0, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;
|
|
|
|
iget-object v0, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;
|
|
|
|
invoke-direct {v1, v2, v0}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getHttpService()Lcom/ea/eadp/http/services/HttpService;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isInForeground()Z
|
|
.locals 1
|
|
|
|
.line 251
|
|
sget-boolean v0, Lcom/ea/eadp/pushnotification/lifecycles/PushLifecycleCallbacks;->inForeground:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onHandleMessage(Landroid/content/Intent;)V
|
|
.locals 4
|
|
|
|
.line 96
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, "Skipping Push Notification: Incomplete Intent. Missing expected extras bundle."
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
.line 99
|
|
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 102
|
|
:cond_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Message received: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v2, v0, [Ljava/lang/Object;
|
|
|
|
const-string v3, "FCMMessageService"
|
|
|
|
invoke-static {v3, v1, v2}, Lcom/ea/nimble/Log$Helper;->LOGIS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
.line 104
|
|
invoke-virtual {p0, p1}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->displayNotification(Landroid/os/Bundle;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 106
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p0, v1, p1}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->postNotification(Landroid/content/Context;Landroid/os/Bundle;)V
|
|
|
|
:cond_1
|
|
const-string v1, "ensEvents"
|
|
|
|
.line 110
|
|
invoke-virtual {p1, v1}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 115
|
|
:try_start_0
|
|
invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const-string v1, "ensEvents flag found but not parseable as integer"
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
.line 119
|
|
invoke-static {v3, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGWS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
const/4 v0, 0x3
|
|
|
|
:goto_0
|
|
const-string v1, "pushId"
|
|
|
|
.line 124
|
|
invoke-virtual {p1, v1}, Landroid/os/BaseBundle;->containsKey(Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-ge v0, v2, :cond_3
|
|
|
|
if-gez v0, :cond_6
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->pushManager:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
.line 128
|
|
new-instance v0, Lcom/ea/eadp/pushnotification/services/AndroidPushService;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->getHttpService()Lcom/ea/eadp/http/services/HttpService;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v0, v2, v3}, Lcom/ea/eadp/pushnotification/services/AndroidPushService;-><init>(Landroid/content/Context;Lcom/ea/eadp/http/services/HttpService;)V
|
|
|
|
iput-object v0, p0, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->pushManager:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.line 131
|
|
:cond_4
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->isMainApplicationRunning()Z
|
|
|
|
move-result v0
|
|
|
|
const-string v2, "NOTIFICATION_RECEIVED"
|
|
|
|
const-string v3, "pnType"
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->pushManager:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.line 133
|
|
invoke-virtual {p1, v1}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v3}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, v1, p1, v2}, Lcom/ea/eadp/pushnotification/services/IPushService;->sendTrackingEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->pushManager:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.line 137
|
|
invoke-virtual {p1, v1}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v3}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, v1, p1, v2}, Lcom/ea/eadp/pushnotification/services/IPushService;->persistTrackingEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_6
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public onHandleWork(Landroid/content/Intent;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 84
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
new-array p1, p1, [Ljava/lang/Object;
|
|
|
|
const-string v0, "Skipping Push Notification: Incomplete Intent. Missing expected extras bundle."
|
|
|
|
.line 87
|
|
invoke-static {p0, v0, p1}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 91
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Lcom/ea/eadp/pushnotification/forwarding/FCMMessageService;->onHandleMessage(Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|