apkfuckery/com.discord/smali/com/discord/utilities/cache/SharedPreferenceExtensionsKt.smali
2019-12-21 02:41:59 +01:00

84 lines
2 KiB
Smali

.class public final Lcom/discord/utilities/cache/SharedPreferenceExtensionsKt;
.super Ljava/lang/Object;
.source "SharedPreferenceExtensions.kt"
# direct methods
.method public static final edit(Landroid/content/SharedPreferences;Lkotlin/jvm/functions/Function1;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/SharedPreferences;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Landroid/content/SharedPreferences$Editor;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
const/4 v0, 0x0
if-eqz p0, :cond_1
if-eqz p1, :cond_0
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string v0, "it"
invoke-static {p0, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {p1, p0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
:cond_0
const-string p0, "onReceivedEditor"
invoke-static {p0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p0, "$this$edit"
invoke-static {p0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
.method public static final getString(Landroid/content/SharedPreferences;Ljava/lang/String;)Ljava/lang/String;
.locals 1
const/4 v0, 0x0
if-eqz p0, :cond_1
if-eqz p1, :cond_0
invoke-interface {p0, p1, v0}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
:cond_0
const-string p0, "key"
invoke-static {p0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_1
const-string p0, "$this$getString"
invoke-static {p0}, Lt/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method