- 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
1215 lines
26 KiB
Smali
1215 lines
26 KiB
Smali
.class public final Lcom/tapjoy/TJSession;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/tapjoy/TJSession;
|
|
|
|
.field public static a:Ljava/lang/String; = ""
|
|
|
|
.field public static b:Ljava/lang/Integer;
|
|
|
|
.field public static c:Ljava/lang/Integer;
|
|
|
|
.field public static d:Ljava/lang/Integer;
|
|
|
|
.field public static e:Ljava/lang/Long;
|
|
|
|
.field public static f:Ljava/lang/Long;
|
|
|
|
.field public static g:J
|
|
|
|
.field public static h:Ljava/lang/Long;
|
|
|
|
.field public static volatile i:Z
|
|
|
|
.field public static j:Z
|
|
|
|
.field public static k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
.field public static l:Z
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/tapjoy/TJSession;
|
|
|
|
invoke-direct {v0}, Lcom/tapjoy/TJSession;-><init>()V
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->INSTANCE:Lcom/tapjoy/TJSession;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()Ljava/lang/String;
|
|
.locals 6
|
|
|
|
const-string v0, "generating sessionID..."
|
|
|
|
const-string v1, "TJSession"
|
|
|
|
.line 2
|
|
invoke-static {v1, v0}, Lcom/tapjoy/TapjoyLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
:try_start_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v2
|
|
|
|
const/16 v0, 0x3e8
|
|
|
|
int-to-long v4, v0
|
|
|
|
div-long/2addr v2, v4
|
|
|
|
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/tapjoy/TapjoyUtil;->SHA256(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "SHA256(...)"
|
|
|
|
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 6
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "unable to generate session id: "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v1, v0}, Lcom/tapjoy/TapjoyLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const-string v0, ""
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final endSession()V
|
|
.locals 7
|
|
|
|
const/4 v0, 0x1
|
|
|
|
sput-boolean v0, Lcom/tapjoy/TJSession;->l:Z
|
|
|
|
sget-boolean v0, Lcom/tapjoy/TJSession;->i:Z
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-boolean v0, Lcom/tapjoy/TJSession;->i:Z
|
|
|
|
const-string v0, "TJSession"
|
|
|
|
const-string v1, "The session ended"
|
|
|
|
.line 4
|
|
invoke-static {v0, v1}, Lcom/tapjoy/TapjoyLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 5
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
sget-wide v2, Lcom/tapjoy/TJSession;->g:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
sget-object v2, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
const-string v5, "pref_session_total_duration"
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 6
|
|
invoke-virtual {v2, v5, v3, v4}, Lcom/tapjoy/TJKeyValueStorage;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v3
|
|
|
|
:cond_0
|
|
add-long/2addr v3, v0
|
|
|
|
sget-object v2, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 7
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v2, v5, v6}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
.line 8
|
|
:cond_1
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lcom/tapjoy/TJSession;->e:Ljava/lang/Long;
|
|
|
|
.line 9
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v2
|
|
|
|
sget-object v4, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 10
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "pref_session_last_time"
|
|
|
|
invoke-virtual {v4, v6, v5}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
sget-object v4, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
.line 11
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "pref_session_last_duration"
|
|
|
|
invoke-virtual {v4, v6, v5}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
.line 12
|
|
:cond_3
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lcom/tapjoy/TJSession;->f:Ljava/lang/Long;
|
|
|
|
.line 13
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->h:Ljava/lang/Long;
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getDuration()Ljava/lang/Long;
|
|
.locals 4
|
|
|
|
sget-wide v0, Lcom/tapjoy/TJSession;->g:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
sget-wide v2, Lcom/tapjoy/TJSession;->g:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionId()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->a:Ljava/lang/String;
|
|
|
|
.line 1
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {}, Lcom/tapjoy/TJSession;->a()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->a:Ljava/lang/String;
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/tapjoy/TJSession;->a:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionLastDuration()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->h:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionLastLength()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->h:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionLastTime()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->f:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionMonthlyFrequency()I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->c:Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 1
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getSessionTotalCount()I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->d:Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 1
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getSessionTotalLength()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->e:Ljava/lang/Long;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSessionWeeklyFrequency()I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJSession;->b:Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 1
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final initSession()V
|
|
.locals 1
|
|
|
|
sget-boolean v0, Lcom/tapjoy/TJSession;->l:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {}, Lcom/tapjoy/TJSession;->a()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->a:Ljava/lang/String;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-boolean v0, Lcom/tapjoy/TJSession;->l:Z
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/tapjoy/TJSession;->startSession()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
invoke-static {v0}, Lcom/tapjoy/internal/g;->a(Landroid/app/Activity;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isSemiAutoSessionTrackingStarted()Z
|
|
.locals 1
|
|
|
|
sget-boolean v0, Lcom/tapjoy/TJSession;->j:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final onActivityStart(Landroid/app/Activity;)V
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, "TJSession"
|
|
|
|
const-string v0, "onActivityStart: The given activity was null"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lcom/tapjoy/TapjoyLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/app/Activity;->getApplication()Landroid/app/Application;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/tapjoy/internal/j;->a(Landroid/content/Context;)V
|
|
|
|
.line 5
|
|
sget v0, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
sput v0, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
.line 6
|
|
sget-object v0, Lcom/tapjoy/internal/j;->c:Lcom/tapjoy/internal/g3;
|
|
|
|
.line 7
|
|
new-instance v1, Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-direct {v1, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object v1, v0, Lcom/tapjoy/internal/g3;->a:Ljava/lang/ref/WeakReference;
|
|
|
|
.line 8
|
|
invoke-virtual {p0}, Lcom/tapjoy/TJSession;->startSession()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 9
|
|
invoke-static {p1}, Lcom/tapjoy/internal/g;->a(Landroid/app/Activity;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onActivityStop(Landroid/app/Activity;)V
|
|
.locals 2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, "TJSession"
|
|
|
|
const-string v0, "onActivityStop: The given activity was null"
|
|
|
|
.line 1
|
|
invoke-static {p1, v0}, Lcom/tapjoy/TapjoyLog;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
sget p1, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
sput p1, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
.line 3
|
|
sget-object v0, Lcom/tapjoy/internal/j;->c:Lcom/tapjoy/internal/g3;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 4
|
|
iput-object v1, v0, Lcom/tapjoy/internal/g3;->a:Ljava/lang/ref/WeakReference;
|
|
|
|
if-gez p1, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 5
|
|
sput p1, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
.line 6
|
|
:cond_1
|
|
sget p1, Lcom/tapjoy/internal/j;->b:I
|
|
|
|
if-lez p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
.line 7
|
|
:cond_2
|
|
invoke-virtual {p0}, Lcom/tapjoy/TJSession;->endSession()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setAutomaticSessionTracking(Landroid/content/Context;Ljava/util/Hashtable;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"Ljava/util/Hashtable<",
|
|
"Ljava/lang/String;",
|
|
"*>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "applicationContext"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const-string v0, "TJC_OPTION_DISABLE_AUTOMATIC_SESSION_TRACKING"
|
|
|
|
.line 1
|
|
invoke-virtual {p2, v0}, Ljava/util/Hashtable;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "true"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 2
|
|
invoke-static {p2, v0, v1}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const-string p1, "TJSession"
|
|
|
|
const-string p2, "Automatic session tracking is disabled."
|
|
|
|
.line 9
|
|
invoke-static {p1, p2}, Lcom/tapjoy/TapjoyLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 10
|
|
:cond_0
|
|
invoke-static {p1}, Lcom/tapjoy/internal/c;->a(Landroid/content/Context;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setContext(Landroid/content/Context;)V
|
|
.locals 16
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 1
|
|
new-instance v1, Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
const-string v2, "tjcPrefrences"
|
|
|
|
invoke-direct {v1, v0, v2}, Lcom/tapjoy/TJKeyValueStorage;-><init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
sput-object v1, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
.line 3
|
|
new-instance v2, Lcom/tapjoy/TJPreferencesMigration;
|
|
|
|
const-string v3, "fiverocks"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 5
|
|
invoke-virtual {v0, v3, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v3, "getSharedPreferences(...)"
|
|
|
|
invoke-static {v0, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v3, "fql"
|
|
|
|
const-string v5, "pref_daily_frequency_last"
|
|
|
|
.line 7
|
|
invoke-static {v3, v5}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v3, "fq"
|
|
|
|
const-string v5, "pref_daily_frequency"
|
|
|
|
.line 8
|
|
invoke-static {v3, v5}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v7
|
|
|
|
const-string v3, "ss"
|
|
|
|
const-string v12, "pref_session_total_count"
|
|
|
|
.line 9
|
|
invoke-static {v3, v12}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v8
|
|
|
|
const-string v3, "std"
|
|
|
|
const-string v13, "pref_session_total_duration"
|
|
|
|
.line 10
|
|
invoke-static {v3, v13}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v9
|
|
|
|
const-string v3, "slt"
|
|
|
|
const-string v14, "pref_session_last_time"
|
|
|
|
.line 11
|
|
invoke-static {v3, v14}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v10
|
|
|
|
const-string v3, "sld"
|
|
|
|
const-string v15, "pref_session_last_duration"
|
|
|
|
.line 12
|
|
invoke-static {v3, v15}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
|
|
|
|
move-result-object v11
|
|
|
|
filled-new-array/range {v6 .. v11}, [Lkotlin/Pair;
|
|
|
|
move-result-object v3
|
|
|
|
.line 13
|
|
invoke-static {v3}, Lkotlin/collections/MapsKt;->mapOf([Lkotlin/Pair;)Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
.line 21
|
|
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
.line 22
|
|
invoke-direct {v2, v1, v0, v3, v6}, Lcom/tapjoy/TJPreferencesMigration;-><init>(Lcom/tapjoy/TJKeyValueStorage;Landroid/content/SharedPreferences;Ljava/util/Map;Ljava/util/List;)V
|
|
|
|
.line 35
|
|
invoke-virtual {v2}, Lcom/tapjoy/TJPreferencesMigration;->migrateAllKeysIfExists()V
|
|
|
|
.line 37
|
|
invoke-virtual {v1, v5, v4}, Lcom/tapjoy/TJKeyValueStorage;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
sget-object v2, Lcom/tapjoy/TJSession;->INSTANCE:Lcom/tapjoy/TJSession;
|
|
|
|
.line 38
|
|
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
and-int/lit8 v2, v0, 0x7f
|
|
|
|
.line 39
|
|
invoke-static {v2}, Ljava/lang/Integer;->bitCount(I)I
|
|
|
|
move-result v2
|
|
|
|
.line 40
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lcom/tapjoy/TJSession;->b:Ljava/lang/Integer;
|
|
|
|
const v2, 0x3fffffff # 1.9999999f
|
|
|
|
and-int/2addr v0, v2
|
|
|
|
.line 41
|
|
invoke-static {v0}, Ljava/lang/Integer;->bitCount(I)I
|
|
|
|
move-result v0
|
|
|
|
.line 42
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->c:Ljava/lang/Integer;
|
|
|
|
.line 44
|
|
invoke-virtual {v1, v12, v4}, Lcom/tapjoy/TJKeyValueStorage;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
.line 46
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->d:Ljava/lang/Integer;
|
|
|
|
:cond_0
|
|
const-wide/16 v2, 0x0
|
|
|
|
.line 48
|
|
invoke-virtual {v1, v13, v2, v3}, Lcom/tapjoy/TJKeyValueStorage;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v0, v4, v2
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
.line 50
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->e:Ljava/lang/Long;
|
|
|
|
.line 52
|
|
:cond_1
|
|
invoke-virtual {v1, v14, v2, v3}, Lcom/tapjoy/TJKeyValueStorage;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v0, v4, v2
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
.line 54
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->f:Ljava/lang/Long;
|
|
|
|
.line 56
|
|
:cond_2
|
|
invoke-virtual {v1, v15, v2, v3}, Lcom/tapjoy/TJKeyValueStorage;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long v2, v0, v2
|
|
|
|
if-lez v2, :cond_3
|
|
|
|
.line 58
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/tapjoy/TJSession;->h:Ljava/lang/Long;
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setSemiAutoSessionTrackingStarted(Z)V
|
|
.locals 0
|
|
|
|
sput-boolean p1, Lcom/tapjoy/TJSession;->j:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final startSession()Z
|
|
.locals 16
|
|
|
|
sget-boolean v0, Lcom/tapjoy/TJSession;->i:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_d
|
|
|
|
const/4 v0, 0x1
|
|
|
|
sput-boolean v0, Lcom/tapjoy/TJSession;->i:Z
|
|
|
|
const-string v2, "TJSession"
|
|
|
|
const-string v3, "New session started"
|
|
|
|
.line 3
|
|
invoke-static {v2, v3}, Lcom/tapjoy/TapjoyLog;->i(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 4
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v2
|
|
|
|
.line 5
|
|
invoke-virtual {v2, v0}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v3
|
|
|
|
mul-int/lit16 v3, v3, 0x2710
|
|
|
|
const/4 v4, 0x2
|
|
|
|
invoke-virtual {v2, v4}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v5
|
|
|
|
mul-int/lit8 v5, v5, 0x64
|
|
|
|
add-int/2addr v5, v3
|
|
|
|
add-int/lit8 v5, v5, 0x64
|
|
|
|
const/4 v3, 0x5
|
|
|
|
.line 6
|
|
invoke-virtual {v2, v3}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v6
|
|
|
|
add-int/2addr v6, v5
|
|
|
|
sget-object v5, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
const-string v7, "pref_daily_frequency_last"
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
.line 7
|
|
invoke-virtual {v5, v7, v1}, Lcom/tapjoy/TJKeyValueStorage;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v5, v1
|
|
|
|
:goto_0
|
|
if-eq v5, v6, :cond_a
|
|
|
|
const-string v8, "pref_daily_frequency"
|
|
|
|
if-nez v5, :cond_1
|
|
|
|
.line 12
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lcom/tapjoy/TJSession;->b:Ljava/lang/Integer;
|
|
|
|
.line 13
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lcom/tapjoy/TJSession;->c:Ljava/lang/Integer;
|
|
|
|
move v2, v0
|
|
|
|
goto/16 :goto_6
|
|
|
|
:cond_1
|
|
sget-object v9, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v9, :cond_2
|
|
|
|
.line 15
|
|
invoke-virtual {v9, v8, v1}, Lcom/tapjoy/TJKeyValueStorage;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v9
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move v9, v1
|
|
|
|
.line 16
|
|
:goto_1
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v10
|
|
|
|
.line 17
|
|
div-int/lit16 v11, v5, 0x2710
|
|
|
|
div-int/lit8 v12, v5, 0x64
|
|
|
|
rem-int/lit8 v12, v12, 0x64
|
|
|
|
sub-int/2addr v12, v0
|
|
|
|
rem-int/lit8 v5, v5, 0x64
|
|
|
|
invoke-virtual {v10, v11, v12, v5}, Ljava/util/Calendar;->set(III)V
|
|
|
|
.line 18
|
|
invoke-virtual {v2, v0}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v10, v0}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v11
|
|
|
|
sub-int/2addr v5, v11
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->signum(I)I
|
|
|
|
move-result v5
|
|
|
|
const/4 v11, -0x1
|
|
|
|
if-eq v5, v11, :cond_4
|
|
|
|
if-eq v5, v0, :cond_3
|
|
|
|
const/4 v3, 0x6
|
|
|
|
.line 22
|
|
invoke-virtual {v2, v3}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v10, v3}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v3
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
goto :goto_4
|
|
|
|
.line 29
|
|
:cond_3
|
|
invoke-virtual {v2}, Ljava/util/Calendar;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object v11
|
|
|
|
check-cast v11, Ljava/util/Calendar;
|
|
|
|
.line 30
|
|
invoke-virtual {v10, v0}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {v10, v4}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v4
|
|
|
|
.line 31
|
|
invoke-virtual {v10, v3}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v10
|
|
|
|
.line 32
|
|
invoke-virtual {v11, v12, v4, v10}, Ljava/util/Calendar;->set(III)V
|
|
|
|
.line 34
|
|
invoke-virtual {v2}, Ljava/util/Calendar;->getTimeInMillis()J
|
|
|
|
move-result-wide v12
|
|
|
|
goto :goto_2
|
|
|
|
.line 35
|
|
:cond_4
|
|
invoke-virtual {v10}, Ljava/util/Calendar;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object v11
|
|
|
|
check-cast v11, Ljava/util/Calendar;
|
|
|
|
.line 36
|
|
invoke-virtual {v2, v0}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {v2, v4}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v11, v12, v4, v2}, Ljava/util/Calendar;->set(III)V
|
|
|
|
.line 37
|
|
invoke-virtual {v10}, Ljava/util/Calendar;->getTimeInMillis()J
|
|
|
|
move-result-wide v12
|
|
|
|
:goto_2
|
|
move v2, v1
|
|
|
|
.line 48
|
|
:goto_3
|
|
invoke-virtual {v11}, Ljava/util/Calendar;->getTimeInMillis()J
|
|
|
|
move-result-wide v14
|
|
|
|
cmp-long v4, v14, v12
|
|
|
|
if-gez v4, :cond_5
|
|
|
|
.line 49
|
|
invoke-virtual {v11, v3, v0}, Ljava/util/Calendar;->add(II)V
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
if-lez v5, :cond_6
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
neg-int v2, v2
|
|
|
|
.line 50
|
|
:goto_4
|
|
invoke-static {v2}, Ljava/lang/Math;->abs(I)I
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x1e
|
|
|
|
if-lt v3, v4, :cond_7
|
|
|
|
move v2, v1
|
|
|
|
goto :goto_5
|
|
|
|
:cond_7
|
|
if-ltz v2, :cond_8
|
|
|
|
shl-int v2, v9, v2
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
neg-int v2, v2
|
|
|
|
shr-int v2, v9, v2
|
|
|
|
:goto_5
|
|
or-int/2addr v2, v0
|
|
|
|
and-int/lit8 v3, v2, 0x7f
|
|
|
|
.line 51
|
|
invoke-static {v3}, Ljava/lang/Integer;->bitCount(I)I
|
|
|
|
move-result v3
|
|
|
|
const v4, 0x3fffffff # 1.9999999f
|
|
|
|
and-int/2addr v4, v2
|
|
|
|
.line 52
|
|
invoke-static {v4}, Ljava/lang/Integer;->bitCount(I)I
|
|
|
|
move-result v4
|
|
|
|
.line 53
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
sput-object v3, Lcom/tapjoy/TJSession;->b:Ljava/lang/Integer;
|
|
|
|
.line 54
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
sput-object v3, Lcom/tapjoy/TJSession;->c:Ljava/lang/Integer;
|
|
|
|
:goto_6
|
|
sget-object v3, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v3, :cond_9
|
|
|
|
.line 56
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v7, v4}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
:cond_9
|
|
sget-object v3, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
.line 57
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v8, v2}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
:cond_a
|
|
sget-object v2, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
const-string v3, "pref_session_total_count"
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
.line 58
|
|
invoke-virtual {v2, v3, v1}, Lcom/tapjoy/TJKeyValueStorage;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
:cond_b
|
|
add-int/2addr v1, v0
|
|
|
|
sget-object v2, Lcom/tapjoy/TJSession;->k:Lcom/tapjoy/TJKeyValueStorage;
|
|
|
|
if-eqz v2, :cond_c
|
|
|
|
.line 59
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v2, v3, v4}, Lcom/tapjoy/TJKeyValueStorage;->setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
.line 60
|
|
:cond_c
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
sput-object v1, Lcom/tapjoy/TJSession;->d:Ljava/lang/Integer;
|
|
|
|
.line 61
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
sput-wide v1, Lcom/tapjoy/TJSession;->g:J
|
|
|
|
move v1, v0
|
|
|
|
:cond_d
|
|
return v1
|
|
.end method
|