- 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
1426 lines
40 KiB
Smali
1426 lines
40 KiB
Smali
.class public Lcom/ea/nimble/pushtng/PushNotificationImpl;
|
|
.super Lcom/ea/nimble/Component;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lcom/ea/nimble/pushtng/IPushNotification;
|
|
.implements Lcom/ea/nimble/LogSource;
|
|
.implements Lcom/ea/nimble/IApplicationLifecycle$ActivityLifecycleCallbacks;
|
|
|
|
|
|
# static fields
|
|
.field private static final NOTIFICATION_TRACKING2_LOG_EVENT:Ljava/lang/String; = "nimble.notification.tracking2.logEvent"
|
|
|
|
.field private static final PERSISTENCE_DISABLED_KEY:Ljava/lang/String; = "disabled"
|
|
|
|
|
|
# instance fields
|
|
.field private disableCheck:Ljava/lang/String;
|
|
|
|
.field private disabled:Ljava/lang/Boolean;
|
|
|
|
.field private dobFromAgeCompliance:J
|
|
|
|
.field private m_ageListener:Landroid/content/BroadcastReceiver;
|
|
|
|
.field private pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.field private statusCheck:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 52
|
|
invoke-direct {p0}, Lcom/ea/nimble/Component;-><init>()V
|
|
|
|
const-wide/32 v0, -0x80000000
|
|
|
|
iput-wide v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->dobFromAgeCompliance:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$000(Lcom/ea/nimble/pushtng/PushNotificationImpl;)J
|
|
.locals 2
|
|
|
|
.line 52
|
|
iget-wide v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->dobFromAgeCompliance:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public static synthetic access$002(Lcom/ea/nimble/pushtng/PushNotificationImpl;J)J
|
|
.locals 0
|
|
|
|
.line 52
|
|
iput-wide p1, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->dobFromAgeCompliance:J
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public static synthetic access$100(Lcom/ea/nimble/pushtng/PushNotificationImpl;)V
|
|
.locals 0
|
|
|
|
.line 52
|
|
invoke-direct {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->onComponentSetupCompleted()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$202(Lcom/ea/nimble/pushtng/PushNotificationImpl;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
.line 52
|
|
iput-object p1, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disableCheck:Ljava/lang/String;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$302(Lcom/ea/nimble/pushtng/PushNotificationImpl;Z)Z
|
|
.locals 0
|
|
|
|
.line 52
|
|
iput-boolean p1, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->statusCheck:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method private getValidDOB(Ljava/util/Date;)Ljava/util/Date;
|
|
.locals 8
|
|
|
|
.line 509
|
|
new-instance v0, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v1, "yyyy-MM"
|
|
|
|
invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "GMT"
|
|
|
|
.line 510
|
|
invoke-static {v1}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 511
|
|
invoke-virtual {p1}, Ljava/util/Date;->getTime()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v4, v4, v1
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 529
|
|
:cond_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "getValidDOB(): Using valid DOB from PushTNG: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v1, v3, [Ljava/lang/Object;
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget-wide v4, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->dobFromAgeCompliance:J
|
|
|
|
const-wide/32 v6, -0x80000000
|
|
|
|
cmp-long p1, v4, v6
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 517
|
|
new-instance p1, Ljava/util/Date;
|
|
|
|
iget-wide v1, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->dobFromAgeCompliance:J
|
|
|
|
const-wide/16 v4, 0x3e8
|
|
|
|
mul-long/2addr v1, v4
|
|
|
|
invoke-direct {p1, v1, v2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 518
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "getValidDOB(): Got DOB from AgeCompliance: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v1, v3, [Ljava/lang/Object;
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 523
|
|
:cond_2
|
|
new-instance p1, Ljava/util/Date;
|
|
|
|
invoke-direct {p1, v1, v2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 524
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "getValidDOB(): Default DOB to 1/1/1970: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v1, v3, [Ljava/lang/Object;
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private onComponentSetupCompleted()V
|
|
.locals 14
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x1a
|
|
.end annotation
|
|
|
|
.line 182
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 183
|
|
invoke-static {}, Lcom/ea/nimble/SynergyEnvironment;->getComponent()Lcom/ea/nimble/ISynergyEnvironment;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, "Synergy environment is null! Unable to complete component setup for PushTNG."
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 187
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v2, "ens.url"
|
|
|
|
.line 191
|
|
invoke-interface {v0, v2}, Lcom/ea/nimble/ISynergyEnvironment;->getServerUrlWithKey(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
.line 192
|
|
invoke-interface {v0}, Lcom/ea/nimble/ISynergyEnvironment;->getProductId()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
.line 193
|
|
invoke-interface {v0}, Lcom/ea/nimble/ISynergyEnvironment;->getSellId()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
if-eqz v8, :cond_6
|
|
|
|
if-eqz v9, :cond_6
|
|
|
|
if-nez v10, :cond_1
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 200
|
|
:cond_1
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v6
|
|
|
|
.line 201
|
|
new-instance v4, Lcom/ea/nimble/pushtng/NimbleAndroidHttpService;
|
|
|
|
invoke-direct {v4}, Lcom/ea/nimble/pushtng/NimbleAndroidHttpService;-><init>()V
|
|
|
|
.line 202
|
|
new-instance v5, Lcom/ea/nimble/pushtng/NimbleDeviceIdService;
|
|
|
|
invoke-direct {v5}, Lcom/ea/nimble/pushtng/NimbleDeviceIdService;-><init>()V
|
|
|
|
const-string v0, "notification"
|
|
|
|
.line 207
|
|
invoke-virtual {v6, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/app/NotificationManager;
|
|
|
|
const-string v2, "com.ea.nimble.pushtng.channel.id"
|
|
|
|
.line 208
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->configValueExists(Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
const-string v2, "com.ea.nimble.pushtng.channel.name"
|
|
|
|
.line 213
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->configValueExists(Ljava/lang/String;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
.line 215
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsInt(Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
.line 216
|
|
invoke-virtual {v6}, 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
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-string v2, "Default"
|
|
|
|
.line 219
|
|
:goto_0
|
|
new-instance v3, Landroid/app/NotificationChannel;
|
|
|
|
const-string v7, "nimble_default"
|
|
|
|
const/4 v11, 0x3
|
|
|
|
invoke-direct {v3, v7, v2, v11}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V
|
|
|
|
const-string v2, "com.ea.nimble.pushtng.channel.description"
|
|
|
|
.line 221
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->configValueExists(Ljava/lang/String;)Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
.line 223
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsInt(Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
.line 224
|
|
invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v2}, Landroid/app/NotificationChannel;->setDescription(Ljava/lang/String;)V
|
|
|
|
.line 227
|
|
:cond_3
|
|
invoke-virtual {v0, v3}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V
|
|
|
|
:cond_4
|
|
const-string v0, "com.ea.nimble.pushtng.auth.api.key"
|
|
|
|
.line 232
|
|
invoke-static {v0}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsInt(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
const-string v2, "com.ea.nimble.pushtng.auth.api.secret"
|
|
|
|
.line 233
|
|
invoke-static {v2}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsInt(Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 236
|
|
invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
.line 237
|
|
invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
.line 238
|
|
new-instance v0, Lcom/ea/eadp/pushnotification/services/AndroidPushService;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
move-object v3, v0
|
|
|
|
invoke-direct/range {v3 .. v13}, Lcom/ea/eadp/pushnotification/services/AndroidPushService;-><init>(Lcom/ea/eadp/http/services/HttpService;Lcom/ea/eadp/deviceid/DeviceIdService;Landroid/content/Context;Lcom/ea/eadp/pushnotification/listeners/IPushListener;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
|
|
|
|
iput-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
const-string v0, "nimble.pushtng.componentSetupComplete"
|
|
|
|
.line 240
|
|
invoke-static {v0}, Lcom/ea/nimble/Utility;->sendBroadcast(Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.line 241
|
|
invoke-interface {v0}, Lcom/ea/eadp/pushnotification/services/IPushService;->sendPendingTrackingRequests()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
const-string v0, "Configuration data not loaded. Push component not initialized."
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 245
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_6
|
|
:goto_2
|
|
const-string v0, "Synergy environment startup requests finished, but data is not available"
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 196
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static persistTrackingData(Landroid/content/Context;Ljava/util/Map;Ljava/lang/String;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "PushNotificationImpl"
|
|
|
|
.line 494
|
|
invoke-static {v0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNCS(Ljava/lang/String;)V
|
|
|
|
.line 495
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "PushTNGTracking"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p0
|
|
|
|
.line 496
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p0
|
|
|
|
.line 497
|
|
new-instance v0, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p0, p2, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
.line 498
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private startWithConfig(Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
.locals 2
|
|
|
|
.line 296
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 298
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
.line 299
|
|
new-instance v1, Lcom/ea/nimble/pushtng/PushNotificationImpl$3;
|
|
|
|
invoke-direct {v1, p0, p2, p1, v0}, Lcom/ea/nimble/pushtng/PushNotificationImpl$3;-><init>(Lcom/ea/nimble/pushtng/PushNotificationImpl;Lcom/ea/eadp/pushnotification/listeners/IPushListener;Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;Landroid/content/Context;)V
|
|
|
|
iget-object p2, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
.line 357
|
|
invoke-interface {p2, v1}, Lcom/ea/eadp/pushnotification/services/IPushService;->setPushListener(Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
|
|
iget-object p2, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 358
|
|
invoke-interface {p2, p1, v0}, Lcom/ea/eadp/pushnotification/services/IPushService;->startWithConfig(Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;Ljava/lang/String;)V
|
|
|
|
.line 361
|
|
invoke-virtual {p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->isDisabled()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 362
|
|
invoke-virtual {p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->getDisabledReason()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "opt_out"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
:cond_0
|
|
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disabled:Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/Boolean;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 364
|
|
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disabled:Ljava/lang/Boolean;
|
|
|
|
.line 365
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string v0, "en"
|
|
|
|
const-string v1, "settings"
|
|
|
|
.line 366
|
|
invoke-virtual {p1, v0, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 367
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
const-string v1, "core"
|
|
|
|
.line 368
|
|
invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
const-string p1, "type"
|
|
|
|
const-string v1, "opt_in_pn"
|
|
|
|
.line 369
|
|
invoke-virtual {v0, p1, v1}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const-string p1, "declined"
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string p1, "accepted"
|
|
|
|
:goto_0
|
|
const-string p2, "status"
|
|
|
|
.line 371
|
|
invoke-virtual {v0, p2, p1}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 373
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
invoke-direct {p1}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string p2, "nimble.notification.tracking2.logEvent"
|
|
|
|
.line 374
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 375
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
.line 376
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
|
|
|
|
.line 378
|
|
invoke-virtual {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->getComponentId()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/ea/nimble/Persistence$Storage;->CACHE:Lcom/ea/nimble/Persistence$Storage;
|
|
|
|
invoke-static {p1, p2}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const-string p2, "disabled"
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disabled:Ljava/lang/Boolean;
|
|
|
|
.line 381
|
|
invoke-virtual {p1, p2, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cleanup()V
|
|
.locals 1
|
|
|
|
.line 141
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->m_ageListener:Landroid/content/BroadcastReceiver;
|
|
|
|
.line 142
|
|
invoke-static {v0}, Lcom/ea/nimble/Utility;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->m_ageListener:Landroid/content/BroadcastReceiver;
|
|
|
|
.line 144
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationLifecycle;->getComponent()Lcom/ea/nimble/IApplicationLifecycle;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p0}, Lcom/ea/nimble/IApplicationLifecycle;->unregisterActivityLifecycleCallbacks(Lcom/ea/nimble/IApplicationLifecycle$ActivityLifecycleCallbacks;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getComponentId()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "com.ea.nimble.pushtng"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getDisableStatus()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 406
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disableCheck:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getLogSourceTitle()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "PushTNG"
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRegistrationStatus()Z
|
|
.locals 1
|
|
|
|
.line 399
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-boolean v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->statusCheck:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onActivityCreated(Landroid/app/Activity;Landroid/os/Bundle;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityDestroyed(Landroid/app/Activity;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityPaused(Landroid/app/Activity;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityResumed(Landroid/app/Activity;)V
|
|
.locals 0
|
|
|
|
.line 159
|
|
invoke-virtual {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->sendPendingTrackingRequests()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivitySaveInstanceState(Landroid/app/Activity;Landroid/os/Bundle;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityStarted(Landroid/app/Activity;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onActivityStopped(Landroid/app/Activity;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public restore()V
|
|
.locals 2
|
|
|
|
.line 104
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 105
|
|
invoke-virtual {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->sendPendingTrackingRequests()V
|
|
|
|
.line 107
|
|
invoke-virtual {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->getComponentId()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/ea/nimble/Persistence$Storage;->CACHE:Lcom/ea/nimble/Persistence$Storage;
|
|
|
|
invoke-static {v0, v1}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v1, "disabled"
|
|
|
|
.line 110
|
|
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Boolean;
|
|
|
|
iput-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->disabled:Ljava/lang/Boolean;
|
|
|
|
.line 113
|
|
:cond_0
|
|
invoke-static {}, Lcom/ea/nimble/SynergyEnvironment;->getComponent()Lcom/ea/nimble/ISynergyEnvironment;
|
|
|
|
move-result-object v0
|
|
|
|
.line 115
|
|
invoke-interface {v0}, Lcom/ea/nimble/ISynergyEnvironment;->getProductId()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Lcom/ea/nimble/ISynergyEnvironment;->getSellId()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const-string v1, "ens.url"
|
|
|
|
invoke-interface {v0, v1}, Lcom/ea/nimble/ISynergyEnvironment;->getServerUrlWithKey(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 117
|
|
invoke-direct {p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->onComponentSetupCompleted()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 121
|
|
:cond_1
|
|
new-instance v0, Lcom/ea/nimble/pushtng/PushNotificationImpl$2;
|
|
|
|
invoke-direct {v0, p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl$2;-><init>(Lcom/ea/nimble/pushtng/PushNotificationImpl;)V
|
|
|
|
const-string v1, "nimble.environment.notification.startup_requests_finished"
|
|
|
|
invoke-static {v1, v0}, Lcom/ea/nimble/Utility;->registerReceiver(Ljava/lang/String;Landroid/content/BroadcastReceiver;)V
|
|
|
|
.line 135
|
|
:goto_0
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationLifecycle;->getComponent()Lcom/ea/nimble/IApplicationLifecycle;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p0}, Lcom/ea/nimble/IApplicationLifecycle;->registerActivityLifecycleCallbacks(Lcom/ea/nimble/IApplicationLifecycle$ActivityLifecycleCallbacks;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public sendPendingTrackingRequests()V
|
|
.locals 9
|
|
|
|
.line 419
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 421
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "PushTNGTracking"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 422
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
.line 423
|
|
new-instance v1, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v1}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
.line 424
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 425
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
.line 427
|
|
invoke-interface {v0, v4, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const-class v5, Ljava/util/HashMap;
|
|
|
|
.line 431
|
|
invoke-virtual {v1, v4, v5}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/Map;
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 432
|
|
invoke-interface {v4}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
.line 434
|
|
invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v1, "com.ea.nimble.tracking"
|
|
|
|
.line 439
|
|
invoke-static {v1}, Lcom/ea/nimble/Base;->getComponent(Ljava/lang/String;)Lcom/ea/nimble/Component;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "trackingType"
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 442
|
|
check-cast v1, Lcom/ea/nimble/tracking/ITracking;
|
|
|
|
.line 443
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v4
|
|
|
|
:goto_1
|
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/util/Map;
|
|
|
|
.line 445
|
|
new-instance v6, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v6, v5}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
.line 446
|
|
invoke-interface {v6, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Ljava/lang/String;
|
|
|
|
.line 447
|
|
invoke-static {}, Lcom/ea/nimble/SynergyEnvironment;->getComponent()Lcom/ea/nimble/ISynergyEnvironment;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v7}, Lcom/ea/nimble/ISynergyEnvironment;->getEADeviceId()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
const-string v8, "NIMBLESTANDARD::KEY_PN_DEVICE_ID"
|
|
|
|
invoke-interface {v6, v8, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 448
|
|
invoke-interface {v1, v5, v6}, Lcom/ea/nimble/tracking/ITracking;->logEvent(Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 453
|
|
:cond_2
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_3
|
|
:goto_2
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
.line 455
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
const-string v5, "NIMBLESTANDARD::PN_RECEIVED"
|
|
|
|
.line 456
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_4
|
|
|
|
const-string v6, "NIMBLESTANDARD::PN_SHOWN_TO_USER"
|
|
|
|
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
.line 459
|
|
:cond_4
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
const-string v4, "received"
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
const-string v4, "impression"
|
|
|
|
.line 468
|
|
:goto_3
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v5}, Ljava/util/HashMap;-><init>()V
|
|
|
|
const-string v6, "en"
|
|
|
|
const-string v7, "message"
|
|
|
|
.line 469
|
|
invoke-virtual {v5, v6, v7}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 470
|
|
new-instance v6, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v6}, Landroid/os/Bundle;-><init>()V
|
|
|
|
const-string v7, "core"
|
|
|
|
.line 471
|
|
invoke-virtual {v6, v7, v5}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
|
|
|
|
const-string v5, "type"
|
|
|
|
const-string v7, "pn"
|
|
|
|
.line 472
|
|
invoke-virtual {v6, v5, v7}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v5, "service"
|
|
|
|
const-string v8, "aruba"
|
|
|
|
.line 473
|
|
invoke-virtual {v6, v5, v8}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v5, "status"
|
|
|
|
.line 474
|
|
invoke-virtual {v6, v5, v4}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v4, "format"
|
|
|
|
.line 475
|
|
invoke-virtual {v6, v4, v7}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v4, "NIMBLESTANDARD::KEY_PN_MESSAGE_ID"
|
|
|
|
.line 476
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
const-string v5, "msg_id"
|
|
|
|
invoke-virtual {v6, v5, v4}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v4, "NIMBLESTANDARD::KEY_PN_MESSAGE_TYPE"
|
|
|
|
.line 477
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
const-string v4, "media"
|
|
|
|
invoke-virtual {v6, v4, v2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 479
|
|
new-instance v2, Landroid/content/Intent;
|
|
|
|
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v4, "nimble.notification.tracking2.logEvent"
|
|
|
|
.line 480
|
|
invoke-virtual {v2, v4}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 481
|
|
invoke-virtual {v2, v6}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
.line 482
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v4}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4, v2}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 487
|
|
:cond_6
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
.line 488
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->clear()Landroid/content/SharedPreferences$Editor;
|
|
|
|
.line 489
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setup()V
|
|
.locals 2
|
|
|
|
.line 68
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
.line 69
|
|
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getCurrentActivity()Landroid/app/Activity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/firebase/FirebaseApp;->initializeApp(Landroid/content/Context;)Lcom/google/firebase/FirebaseApp;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, "PushTNG failed to initialize FireBaseApp. Probably configuration is missing."
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 71
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "PushTNG initialized FireBase app."
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 75
|
|
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->m_ageListener:Landroid/content/BroadcastReceiver;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 80
|
|
new-instance v0, Lcom/ea/nimble/pushtng/PushNotificationImpl$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/ea/nimble/pushtng/PushNotificationImpl$1;-><init>(Lcom/ea/nimble/pushtng/PushNotificationImpl;)V
|
|
|
|
iput-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->m_ageListener:Landroid/content/BroadcastReceiver;
|
|
|
|
const-string v1, "nimble.notification.ageCompliance.dobUpdate"
|
|
|
|
.line 96
|
|
invoke-static {v1, v0}, Lcom/ea/nimble/Utility;->registerReceiver(Ljava/lang/String;Landroid/content/BroadcastReceiver;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public startAsDisabled(Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
.locals 2
|
|
|
|
.line 274
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
const-string p2, "Nimble Component has not yet been initialized."
|
|
|
|
.line 279
|
|
invoke-interface {p4, p1, p2}, Lcom/ea/eadp/pushnotification/listeners/IPushListener;->onConnectionError(ILjava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 284
|
|
:cond_1
|
|
new-instance v0, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;
|
|
|
|
invoke-direct {v0}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;-><init>()V
|
|
|
|
.line 285
|
|
invoke-virtual {v0, p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setUserAlias(Ljava/lang/String;)V
|
|
|
|
.line 286
|
|
new-instance p1, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v1, "yyyy-MM"
|
|
|
|
invoke-direct {p1, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 287
|
|
invoke-direct {p0, p2}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->getValidDOB(Ljava/util/Date;)Ljava/util/Date;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setDateOfBirth(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 288
|
|
invoke-virtual {v0, p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setDisabled(Z)V
|
|
|
|
.line 289
|
|
invoke-virtual {v0, p3}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setDisabledReason(Ljava/lang/String;)V
|
|
|
|
.line 291
|
|
invoke-direct {p0, v0, p4}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->startWithConfig(Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public startWithDefaults(Ljava/lang/String;Ljava/util/Date;Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
.locals 2
|
|
|
|
.line 252
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
new-array p2, p1, [Ljava/lang/Object;
|
|
|
|
const-string v0, "Nimble Component has not yet been initialized."
|
|
|
|
.line 255
|
|
invoke-static {p0, v0, p2}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
.line 258
|
|
invoke-interface {p3, p1, v0}, Lcom/ea/eadp/pushnotification/listeners/IPushListener;->onConnectionError(ILjava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 263
|
|
:cond_1
|
|
new-instance v0, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;
|
|
|
|
invoke-direct {v0}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;-><init>()V
|
|
|
|
.line 264
|
|
invoke-virtual {v0, p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setUserAlias(Ljava/lang/String;)V
|
|
|
|
.line 265
|
|
new-instance p1, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v1, "yyyy-MM"
|
|
|
|
invoke-direct {p1, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 266
|
|
invoke-direct {p0, p2}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->getValidDOB(Ljava/util/Date;)Ljava/util/Date;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;->setDateOfBirth(Ljava/lang/String;)V
|
|
|
|
.line 268
|
|
invoke-direct {p0, v0, p3}, Lcom/ea/nimble/pushtng/PushNotificationImpl;->startWithConfig(Lcom/ea/eadp/pushnotification/models/PushNotificationConfig;Lcom/ea/eadp/pushnotification/listeners/IPushListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public updateToken(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 389
|
|
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/ea/nimble/pushtng/PushNotificationImpl;->pushService:Lcom/ea/eadp/pushnotification/services/IPushService;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 392
|
|
invoke-interface {v0, p1}, Lcom/ea/eadp/pushnotification/services/IPushService;->updateToken(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|