apkfuckery/com.discord/smali/com/adjust/sdk/av.smali
2019-02-04 21:29:01 +01:00

758 lines
15 KiB
Smali

.class public final Lcom/adjust/sdk/av;
.super Ljava/lang/Object;
.source "SharedPreferencesManager.java"
# instance fields
.field private final sharedPreferences:Landroid/content/SharedPreferences;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string v0, "adjust_preferences"
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p1
iput-object p1, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
return-void
.end method
.method private declared-synchronized a(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
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
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method private declared-synchronized d(Ljava/lang/String;J)I
.locals 7
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lcom/adjust/sdk/av;->aA()Lorg/json/JSONArray;
move-result-object v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
move-result v3
if-ge v2, v3, :cond_1
invoke-virtual {v0, v2}, Lorg/json/JSONArray;->getJSONArray(I)Lorg/json/JSONArray;
move-result-object v3
const/4 v4, 0x0
invoke-virtual {v3, v1, v4}, Lorg/json/JSONArray;->optString(ILjava/lang/String;)Ljava/lang/String;
move-result-object v4
if-eqz v4, :cond_0
invoke-virtual {v4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
const-wide/16 v4, -0x1
const/4 v6, 0x1
invoke-virtual {v3, v6, v4, v5}, Lorg/json/JSONArray;->optLong(IJ)J
move-result-wide v3
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
cmp-long v5, v3, p2
if-nez v5, :cond_0
monitor-exit p0
return v2
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
:cond_1
const/4 p1, -0x1
monitor-exit p0
return p1
.end method
.method private declared-synchronized getString(Ljava/lang/String;)Ljava/lang/String;
.locals 2
monitor-enter p0
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v1, p1, v0}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
:try_end_0
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
monitor-exit p0
return-object v0
.end method
.method private declared-synchronized k(Ljava/lang/String;)V
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const/4 v1, 0x1
invoke-interface {v0, p1, v1}, 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
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method private declared-synchronized l(Ljava/lang/String;)Z
.locals 2
monitor-enter p0
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
invoke-interface {v1, p1, v0}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result p1
:try_end_0
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
monitor-exit p0
return v0
.end method
.method private declared-synchronized remove(Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/adjust/sdk/av;->sharedPreferences:Landroid/content/SharedPreferences;
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
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
# virtual methods
.method public final declared-synchronized a(Ljava/lang/String;J)V
.locals 3
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lcom/adjust/sdk/av;->aA()Lorg/json/JSONArray;
move-result-object v0
invoke-virtual {p0, p1, p2, p3}, Lcom/adjust/sdk/av;->c(Ljava/lang/String;J)Lorg/json/JSONArray;
move-result-object v1
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v1, :cond_0
monitor-exit p0
return-void
:cond_0
:try_start_1
new-instance v1, Lorg/json/JSONArray;
invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V
const/4 v2, 0x0
invoke-virtual {v1, v2, p1}, Lorg/json/JSONArray;->put(ILjava/lang/Object;)Lorg/json/JSONArray;
const/4 p1, 0x1
invoke-virtual {v1, p1, p2, p3}, Lorg/json/JSONArray;->put(IJ)Lorg/json/JSONArray;
const/4 p1, 0x2
invoke-virtual {v1, p1, v2}, Lorg/json/JSONArray;->put(II)Lorg/json/JSONArray;
invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
invoke-virtual {p0, v0}, Lcom/adjust/sdk/av;->a(Lorg/json/JSONArray;)V
:try_end_1
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
monitor-exit p0
return-void
.end method
.method public final declared-synchronized a(Lorg/json/JSONArray;)V
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "raw_referrers"
invoke-virtual {p1}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, v0, p1}, Lcom/adjust/sdk/av;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized aA()Lorg/json/JSONArray;
.locals 2
monitor-enter p0
:try_start_0
const-string v0, "raw_referrers"
invoke-direct {p0, v0}, Lcom/adjust/sdk/av;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
new-instance v1, Lorg/json/JSONArray;
invoke-direct {v1, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v1
:catchall_0
move-exception v0
goto :goto_0
:catch_0
:cond_0
:try_start_1
new-instance v0, Lorg/json/JSONArray;
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-object v0
:goto_0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized aB()V
.locals 8
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lcom/adjust/sdk/av;->aA()Lorg/json/JSONArray;
move-result-object v0
const/4 v1, 0x0
const/4 v2, 0x0
const/4 v3, 0x0
:goto_0
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
move-result v4
if-ge v2, v4, :cond_1
invoke-virtual {v0, v2}, Lorg/json/JSONArray;->getJSONArray(I)Lorg/json/JSONArray;
move-result-object v4
const/4 v5, -0x1
const/4 v6, 0x2
invoke-virtual {v4, v6, v5}, Lorg/json/JSONArray;->optInt(II)I
move-result v5
const/4 v7, 0x1
if-ne v5, v7, :cond_0
invoke-virtual {v4, v6, v1}, Lorg/json/JSONArray;->put(II)Lorg/json/JSONArray;
const/4 v3, 0x1
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
if-eqz v3, :cond_2
invoke-virtual {p0, v0}, Lcom/adjust/sdk/av;->a(Lorg/json/JSONArray;)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_2
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
:catch_0
monitor-exit p0
return-void
.end method
.method public final declared-synchronized aC()V
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "push_token"
invoke-direct {p0, v0}, Lcom/adjust/sdk/av;->remove(Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized aD()V
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "install_tracked"
invoke-direct {p0, v0}, Lcom/adjust/sdk/av;->k(Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized aE()Z
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "install_tracked"
invoke-direct {p0, v0}, Lcom/adjust/sdk/av;->l(Ljava/lang/String;)Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized b(Ljava/lang/String;J)V
.locals 2
monitor-enter p0
if-eqz p1, :cond_4
:try_start_0
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-nez v0, :cond_0
goto :goto_1
:cond_0
invoke-direct {p0, p1, p2, p3}, Lcom/adjust/sdk/av;->d(Ljava/lang/String;J)I
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-gez p1, :cond_1
monitor-exit p0
return-void
:cond_1
:try_start_1
invoke-virtual {p0}, Lcom/adjust/sdk/av;->aA()Lorg/json/JSONArray;
move-result-object p2
new-instance p3, Lorg/json/JSONArray;
invoke-direct {p3}, Lorg/json/JSONArray;-><init>()V
const/4 v0, 0x0
:goto_0
invoke-virtual {p2}, Lorg/json/JSONArray;->length()I
move-result v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-ge v0, v1, :cond_3
if-eq v0, p1, :cond_2
:try_start_2
invoke-virtual {p2, v0}, Lorg/json/JSONArray;->getJSONArray(I)Lorg/json/JSONArray;
move-result-object v1
invoke-virtual {p3, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
:try_end_2
.catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:catch_0
:cond_2
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_3
:try_start_3
const-string p1, "raw_referrers"
invoke-virtual {p3}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p0, p1, p2}, Lcom/adjust/sdk/av;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:cond_4
:goto_1
monitor-exit p0
return-void
.end method
.method public final declared-synchronized c(Ljava/lang/String;J)Lorg/json/JSONArray;
.locals 0
monitor-enter p0
:try_start_0
invoke-direct {p0, p1, p2, p3}, Lcom/adjust/sdk/av;->d(Ljava/lang/String;J)I
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-ltz p1, :cond_0
:try_start_1
invoke-virtual {p0}, Lcom/adjust/sdk/av;->aA()Lorg/json/JSONArray;
move-result-object p2
invoke-virtual {p2, p1}, Lorg/json/JSONArray;->getJSONArray(I)Lorg/json/JSONArray;
move-result-object p1
:try_end_1
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit p0
return-object p1
:catch_0
:cond_0
const/4 p1, 0x0
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized getPushToken()Ljava/lang/String;
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "push_token"
invoke-direct {p0, v0}, Lcom/adjust/sdk/av;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized j(Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "push_token"
invoke-direct {p0, v0, p1}, Lcom/adjust/sdk/av;->a(Ljava/lang/String;Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method