apkfuckery/com.discord/smali/f/c/a/r1.smali

486 lines
9.4 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Lf/c/a/r1;
.super Ljava/lang/Object;
2020-07-08 16:44:49 +00:00
.source "SharedPreferencesManager.java"
2020-05-17 12:40:10 +00:00
# instance fields
2020-07-08 16:44:49 +00:00
.field public final a:Landroid/content/SharedPreferences;
2020-05-17 12:40:10 +00:00
# direct methods
2020-07-08 16:44:49 +00:00
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
2020-05-17 12:40:10 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-07-08 16:44:49 +00:00
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, Lf/c/a/r1;->a:Landroid/content/SharedPreferences;
2020-05-17 12:40:10 +00:00
return-void
.end method
# virtual methods
2020-07-08 16:44:49 +00:00
.method public declared-synchronized a()Ljava/lang/String;
.locals 1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-enter p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:try_start_0
const-string v0, "push_token"
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {p0, v0}, Lf/c/a/r1;->e(Ljava/lang/String;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
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 declared-synchronized b(Ljava/lang/String;J)Lorg/json/JSONArray;
.locals 0
monitor-enter p0
:try_start_0
invoke-virtual {p0, p1, p2, p3}, Lf/c/a/r1;->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}, Lf/c/a/r1;->c()Lorg/json/JSONArray;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
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
2020-05-17 12:40:10 +00:00
:cond_0
2020-07-08 16:44:49 +00:00
const/4 p1, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-exit p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized c()Lorg/json/JSONArray;
.locals 2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-enter p0
:try_start_0
const-string v0, "raw_referrers"
invoke-virtual {p0, v0}, Lf/c/a/r1;->e(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
2020-05-17 12:40:10 +00:00
goto :goto_0
2020-07-08 16:44:49 +00:00
:catch_0
:cond_0
:try_start_1
new-instance v0, Lorg/json/JSONArray;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-exit p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:goto_0
monitor-exit p0
throw v0
.end method
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
.method public final declared-synchronized d(Ljava/lang/String;J)I
.locals 7
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lf/c/a/r1;->c()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
2020-05-17 12:40:10 +00:00
move-result v3
2020-07-08 16:44:49 +00:00
if-ge v2, v3, :cond_3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v0, v2}, Lorg/json/JSONArray;->getJSONArray(I)Lorg/json/JSONArray;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result-object v3
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v4, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-virtual {v3, v1, v4}, Lorg/json/JSONArray;->optString(ILjava/lang/String;)Ljava/lang/String;
move-result-object v4
if-eqz v4, :cond_2
invoke-virtual {v4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_0
goto :goto_1
: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-eqz v5, :cond_1
goto :goto_1
:cond_1
monitor-exit p0
return v2
2020-05-17 12:40:10 +00:00
:cond_2
2020-07-08 16:44:49 +00:00
:goto_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
:cond_3
const/4 p1, -0x1
monitor-exit p0
return p1
.end method
.method public final declared-synchronized e(Ljava/lang/String;)Ljava/lang/String;
.locals 2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-enter p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
const/4 v0, 0x0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:try_start_0
iget-object v1, p0, Lf/c/a/r1;->a:Landroid/content/SharedPreferences;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
invoke-interface {v1, p1, v0}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
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
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-exit p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
:catch_0
monitor-exit p0
return-object v0
.end method
.method public declared-synchronized f()V
.locals 2
monitor-enter p0
:try_start_0
const-string v0, "push_token"
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v1, p0, Lf/c/a/r1;->a:Landroid/content/SharedPreferences;
invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
2020-05-17 12:40:10 +00:00
move-result-object v1
2020-07-08 16:44:49 +00:00
invoke-interface {v1, v0}, Landroid/content/SharedPreferences$Editor;->remove(Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
monitor-exit p0
return-void
:catchall_0
move-exception v0
:try_start_3
monitor-exit p0
throw v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:catchall_1
move-exception v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-exit p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
throw v0
.end method
.method public declared-synchronized g(Ljava/lang/String;J)V
.locals 2
monitor-enter p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz p1, :cond_4
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:try_start_0
invoke-virtual {p1}, Ljava/lang/String;->length()I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result v0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-nez v0, :cond_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
goto :goto_2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_0
invoke-virtual {p0, p1, p2, p3}, Lf/c/a/r1;->d(Ljava/lang/String;J)I
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-gez p1, :cond_1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
monitor-exit p0
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
return-void
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
:cond_1
:try_start_1
invoke-virtual {p0}, Lf/c/a/r1;->c()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
2020-05-17 12:40:10 +00:00
:goto_0
2020-07-08 16:44:49 +00:00
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-ne v0, p1, :cond_2
goto :goto_1
: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
:goto_1
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-virtual {p0, p1, p2}, Lf/c/a/r1;->i(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_2
monitor-exit p0
return-void
.end method
.method public declared-synchronized h(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-virtual {p0, v0, p1}, Lf/c/a/r1;->i(Ljava/lang/String;Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
2020-05-17 12:40:10 +00:00
return-void
2020-07-08 16:44:49 +00:00
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized i(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/c/a/r1;->a: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
2020-05-17 12:40:10 +00:00
.end method