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

660 lines
13 KiB
Smali
Raw Normal View History

2020-07-25 02:57:47 +00:00
.class public Lf/c/a/z1;
.super Ljava/lang/Object;
.source "SharedPreferencesManager.java"
# instance fields
.field public final a: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, Lf/c/a/z1;->a:Landroid/content/SharedPreferences;
return-void
.end method
# virtual methods
.method public final declared-synchronized a(Ljava/lang/String;Z)Z
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/c/a/z1;->a:Landroid/content/SharedPreferences;
invoke-interface {v0, p1, p2}, 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 p2
.end method
.method public declared-synchronized b()Z
.locals 2
monitor-enter p0
:try_start_0
const-string v0, "disable_third_party_sharing"
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Lf/c/a/z1;->a(Ljava/lang/String;Z)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 declared-synchronized c()Z
.locals 2
monitor-enter p0
:try_start_0
const-string v0, "gdpr_forget_me"
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Lf/c/a/z1;->a(Ljava/lang/String;Z)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 declared-synchronized d()Ljava/lang/String;
.locals 1
monitor-enter p0
:try_start_0
const-string v0, "push_token"
invoke-virtual {p0, v0}, Lf/c/a/z1;->h(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 declared-synchronized e(Ljava/lang/String;J)Lorg/json/JSONArray;
.locals 0
monitor-enter p0
:try_start_0
invoke-virtual {p0, p1, p2, p3}, Lf/c/a/z1;->g(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/z1;->f()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 declared-synchronized f()Lorg/json/JSONArray;
.locals 5
monitor-enter p0
:try_start_0
const-string v0, "raw_referrers"
invoke-virtual {p0, v0}, Lf/c/a/z1;->h(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v0, :cond_2
:try_start_1
new-instance v1, Lorg/json/JSONArray;
invoke-direct {v1, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Lorg/json/JSONArray;->length()I
move-result v2
const/16 v3, 0xa
if-le v2, v3, :cond_1
new-instance v0, Lorg/json/JSONArray;
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
const/4 v2, 0x0
:goto_0
if-ge v2, v3, :cond_0
invoke-virtual {v1, v2}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object;
move-result-object v4
invoke-virtual {v0, v4}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
invoke-virtual {p0, v0}, Lf/c/a/z1;->l(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-object v0
:cond_1
:try_start_2
new-instance v1, Lorg/json/JSONArray;
invoke-direct {v1, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
:try_end_2
.catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit p0
return-object v1
:catch_0
:catchall_0
:cond_2
:try_start_3
new-instance v0, Lorg/json/JSONArray;
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
monitor-exit p0
return-object v0
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized g(Ljava/lang/String;J)I
.locals 7
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lf/c/a/z1;->f()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_3
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_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
:cond_2
: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 h(Ljava/lang/String;)Ljava/lang/String;
.locals 2
monitor-enter p0
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lf/c/a/z1;->a: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
:try_start_1
const-string v1, "raw_referrers"
invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
const-string p1, "raw_referrers"
invoke-virtual {p0, p1}, Lf/c/a/z1;->i(Ljava/lang/String;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:cond_0
monitor-exit p0
return-object v0
:catchall_1
move-exception p1
monitor-exit p0
throw p1
:catch_0
monitor-exit p0
return-object v0
.end method
.method public final declared-synchronized i(Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/c/a/z1;->a: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
.method public declared-synchronized j(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_2
:cond_0
invoke-virtual {p0, p1, p2, p3}, Lf/c/a/z1;->g(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}, Lf/c/a/z1;->f()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-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/z1;->m(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 final declared-synchronized k(Ljava/lang/String;Z)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/c/a/z1;->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;->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 public declared-synchronized l(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/z1;->m(Ljava/lang/String;Ljava/lang/String;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
:try_start_1
const-string p1, "raw_referrers"
invoke-virtual {p0, p1}, Lf/c/a/z1;->i(Ljava/lang/String;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:goto_0
monitor-exit p0
return-void
:catchall_1
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized m(Ljava/lang/String;Ljava/lang/String;)V
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/c/a/z1;->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
.end method