- 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
607 lines
15 KiB
Smali
607 lines
15 KiB
Smali
.class public Lcom/tapjoy/TJKeyValueStorage;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field public static a:Landroid/content/SharedPreferences;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const-string v0, "tjJSSharedPreference"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
sput-object p1, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 4
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
sput-object p1, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public contains(Ljava/lang/String;)Z
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1}, Landroid/content/SharedPreferences;->contains(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getBoolean(Ljava/lang/String;Z)Z
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getDouble(Ljava/lang/String;D)D
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
double-to-long p2, p2
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2, p3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Double;->longBitsToDouble(J)D
|
|
|
|
move-result-wide p1
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public getFloat(Ljava/lang/String;F)F
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getInt(Ljava/lang/String;I)I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getLong(Ljava/lang/String;J)J
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2, p3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public getSize()I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getValue(Ljava/lang/String;)Ljava/lang/Object;
|
|
.locals 4
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Ljava/lang/String;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
.line 5
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
const-string v1, "tjJSON@"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
const-string v3, ""
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 6
|
|
new-instance p1, Lorg/json/JSONObject;
|
|
|
|
invoke-virtual {v0, v1, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string v1, "tjJSONArray@"
|
|
|
|
.line 7
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
.line 8
|
|
new-instance p1, Lorg/json/JSONArray;
|
|
|
|
invoke-virtual {v0, v1, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
.line 10
|
|
:cond_2
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Ljava/lang/Long;
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
.line 11
|
|
check-cast p1, Ljava/lang/Long;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Double;->longBitsToDouble(J)D
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_3
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getValueType(Ljava/lang/String;)Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public remove(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public reset()V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 1
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->getAll()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setValue(Ljava/lang/String;Ljava/lang/Object;)V
|
|
.locals 3
|
|
|
|
if-eqz p2, :cond_9
|
|
|
|
.line 1
|
|
sget-object v0, Lorg/json/JSONObject;->NULL:Ljava/lang/Object;
|
|
|
|
if-ne p2, v0, :cond_0
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-class v1, Ljava/lang/String;
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 6
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
const-string v1, "\""
|
|
|
|
const-string v2, "\\\""
|
|
|
|
invoke-virtual {p2, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
const-class v1, Ljava/lang/Integer;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 8
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_2
|
|
const-class v1, Lorg/json/JSONObject;
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 10
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "tjJSON@"
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_3
|
|
const-class v1, Lorg/json/JSONArray;
|
|
|
|
if-ne v0, v1, :cond_4
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 12
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "tjJSONArray@"
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_4
|
|
const-class v1, Ljava/lang/Long;
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 14
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/Long;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-interface {v0, p1, v1, v2}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
const-class v1, Ljava/lang/Double;
|
|
|
|
if-ne v0, v1, :cond_6
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 16
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/Double;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Double;->doubleValue()D
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Double;->doubleToRawLongBits(D)J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-interface {v0, p1, v1, v2}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
const-class v1, Ljava/lang/Float;
|
|
|
|
if-ne v0, v1, :cond_7
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 18
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/Float;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Float;->floatValue()F
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
const-class v1, Ljava/lang/Boolean;
|
|
|
|
if-ne v0, v1, :cond_8
|
|
|
|
sget-object v0, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 20
|
|
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {v0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
goto :goto_1
|
|
|
|
.line 22
|
|
:cond_8
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Unknown value type."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_9
|
|
:goto_0
|
|
sget-object p2, Lcom/tapjoy/TJKeyValueStorage;->a:Landroid/content/SharedPreferences;
|
|
|
|
.line 23
|
|
invoke-interface {p2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2, p1}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|