Add Discord APKTool decompilation (Smali source for modding)

- 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
This commit is contained in:
2026-02-18 16:13:44 -08:00
parent c080f0d97f
commit f3960ee359
44288 changed files with 10998761 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
.class final Landroidx/datastore/preferences/core/MutablePreferences$toString$1;
.super Lkotlin/jvm/internal/Lambda;
.source "SourceFile"
# interfaces
.implements Lkotlin/jvm/functions/Function1;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/datastore/preferences/core/MutablePreferences;->toString()Ljava/lang/String;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/internal/Lambda;",
"Lkotlin/jvm/functions/Function1;"
}
.end annotation
# static fields
.field public static final INSTANCE:Landroidx/datastore/preferences/core/MutablePreferences$toString$1;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/datastore/preferences/core/MutablePreferences$toString$1;
invoke-direct {v0}, Landroidx/datastore/preferences/core/MutablePreferences$toString$1;-><init>()V
sput-object v0, Landroidx/datastore/preferences/core/MutablePreferences$toString$1;->INSTANCE:Landroidx/datastore/preferences/core/MutablePreferences$toString$1;
return-void
.end method
.method public constructor <init>()V
.locals 1
const/4 v0, 0x1
invoke-direct {p0, v0}, Lkotlin/jvm/internal/Lambda;-><init>(I)V
return-void
.end method
# virtual methods
.method public final invoke(Ljava/util/Map$Entry;)Ljava/lang/CharSequence;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map$Entry<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;)",
"Ljava/lang/CharSequence;"
}
.end annotation
const-string v0, "entry"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 287
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, " "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {p1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-virtual {v1}, Landroidx/datastore/preferences/core/Preferences$Key;->getName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, " = "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.line 286
check-cast p1, Ljava/util/Map$Entry;
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/core/MutablePreferences$toString$1;->invoke(Ljava/util/Map$Entry;)Ljava/lang/CharSequence;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,554 @@
.class public final Landroidx/datastore/preferences/core/MutablePreferences;
.super Landroidx/datastore/preferences/core/Preferences;
.source "SourceFile"
# instance fields
.field private final frozen:Ljava/util/concurrent/atomic/AtomicBoolean;
.field private final preferencesMap:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 3
.line 0
const/4 v0, 0x0
const/4 v1, 0x3
const/4 v2, 0x0
invoke-direct {p0, v2, v0, v1, v2}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
return-void
.end method
.method public constructor <init>(Ljava/util/Map;Z)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;Z)V"
}
.end annotation
const-string v0, "preferencesMap"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 129
invoke-direct {p0}, Landroidx/datastore/preferences/core/Preferences;-><init>()V
iput-object p1, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 134
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
invoke-direct {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
iput-object p1, p0, Landroidx/datastore/preferences/core/MutablePreferences;->frozen:Ljava/util/concurrent/atomic/AtomicBoolean;
return-void
.end method
.method public synthetic constructor <init>(Ljava/util/Map;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
and-int/lit8 p4, p3, 0x1
if-eqz p4, :cond_0
.line 127
new-instance p1, Ljava/util/LinkedHashMap;
invoke-direct {p1}, Ljava/util/LinkedHashMap;-><init>()V
:cond_0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_1
const/4 p2, 0x1
.line 126
:cond_1
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;Z)V
return-void
.end method
# virtual methods
.method public asMap()Ljava/util/Map;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 157
invoke-static {v0}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v0
const-string v1, "unmodifiableMap(preferencesMap)"
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public final checkNotFrozen$datastore_preferences_core()V
.locals 2
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->frozen:Ljava/util/concurrent/atomic/AtomicBoolean;
.line 137
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_0
return-void
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Do mutate preferences once returned to DataStore."
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final clear()V
.locals 1
.line 262
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 263
invoke-interface {v0}, Ljava/util/Map;->clear()V
return-void
.end method
.method public contains(Landroidx/datastore/preferences/core/Preferences$Key;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;)Z"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 148
invoke-interface {v0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 1
.line 268
instance-of v0, p1, Landroidx/datastore/preferences/core/MutablePreferences;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 269
check-cast p1, Landroidx/datastore/preferences/core/MutablePreferences;
iget-object p1, p1, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
invoke-static {v0, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public final freeze$datastore_preferences_core()V
.locals 2
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->frozen:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x1
.line 144
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
return-void
.end method
.method public get(Landroidx/datastore/preferences/core/Preferences$Key;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;)TT;"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 153
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public final getPreferencesMap$datastore_preferences_core()Ljava/util/Map;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
return-object v0
.end method
.method public hashCode()I
.locals 1
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 275
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
move-result v0
return v0
.end method
.method public final minusAssign(Landroidx/datastore/preferences/core/Preferences$Key;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;)V"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 232
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
.line 233
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/core/MutablePreferences;->remove(Landroidx/datastore/preferences/core/Preferences$Key;)Ljava/lang/Object;
return-void
.end method
.method public final plusAssign(Landroidx/datastore/preferences/core/Preferences$Pair;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences$Pair<",
"*>;)V"
}
.end annotation
const-string v0, "pair"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 218
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
filled-new-array {p1}, [Landroidx/datastore/preferences/core/Preferences$Pair;
move-result-object p1
.line 219
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/core/MutablePreferences;->putAll([Landroidx/datastore/preferences/core/Preferences$Pair;)V
return-void
.end method
.method public final plusAssign(Landroidx/datastore/preferences/core/Preferences;)V
.locals 1
const-string v0, "prefs"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 205
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 206
invoke-virtual {p1}, Landroidx/datastore/preferences/core/Preferences;->asMap()Ljava/util/Map;
move-result-object p1
invoke-interface {v0, p1}, Ljava/util/Map;->putAll(Ljava/util/Map;)V
return-void
.end method
.method public final varargs putAll([Landroidx/datastore/preferences/core/Preferences$Pair;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Landroidx/datastore/preferences/core/Preferences$Pair<",
"*>;)V"
}
.end annotation
const-string v0, "pairs"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 242
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
.line 334
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget-object v2, p1, v1
.line 244
invoke-virtual {v2}, Landroidx/datastore/preferences/core/Preferences$Pair;->getKey$datastore_preferences_core()Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object v3
invoke-virtual {v2}, Landroidx/datastore/preferences/core/Preferences$Pair;->getValue$datastore_preferences_core()Ljava/lang/Object;
move-result-object v2
invoke-virtual {p0, v3, v2}, Landroidx/datastore/preferences/core/MutablePreferences;->setUnchecked$datastore_preferences_core(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public final remove(Landroidx/datastore/preferences/core/Preferences$Key;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;)TT;"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 256
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 257
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public final set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;TT;)V"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 177
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->setUnchecked$datastore_preferences_core(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
return-void
.end method
.method public final setUnchecked$datastore_preferences_core(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
")V"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 184
invoke-virtual {p0}, Landroidx/datastore/preferences/core/MutablePreferences;->checkNotFrozen$datastore_preferences_core()V
if-nez p2, :cond_0
.line 187
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/core/MutablePreferences;->remove(Landroidx/datastore/preferences/core/Preferences$Key;)Ljava/lang/Object;
goto :goto_0
.line 190
:cond_0
instance-of v0, p2, Ljava/util/Set;
if-eqz v0, :cond_1
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
check-cast p2, Ljava/lang/Iterable;
invoke-static {p2}, Lkotlin/collections/CollectionsKt;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
move-result-object p2
invoke-static {p2}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
move-result-object p2
const-string v1, "unmodifiableSet(value.toSet())"
invoke-static {p2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_1
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 191
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:goto_0
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/core/MutablePreferences;->preferencesMap:Ljava/util/Map;
.line 282
invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v1
const-string v2, ",\n"
const-string v3, "{\n"
const-string v4, "\n}"
const/4 v5, 0x0
const/4 v6, 0x0
sget-object v7, Landroidx/datastore/preferences/core/MutablePreferences$toString$1;->INSTANCE:Landroidx/datastore/preferences/core/MutablePreferences$toString$1;
const/16 v8, 0x18
const/4 v9, 0x0
invoke-static/range {v1 .. v9}, Lkotlin/collections/CollectionsKt;->joinToString$default(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,203 @@
.class final Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;
.super Lkotlin/coroutines/jvm/internal/SuspendLambda;
.source "SourceFile"
# interfaces
.implements Lkotlin/jvm/functions/Function2;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/datastore/preferences/core/PreferenceDataStore;->updateData(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/coroutines/jvm/internal/SuspendLambda;",
"Lkotlin/jvm/functions/Function2;"
}
.end annotation
.annotation runtime Lkotlin/coroutines/jvm/internal/DebugMetadata;
c = "androidx.datastore.preferences.core.PreferenceDataStore$updateData$2"
f = "PreferenceDataStoreFactory.kt"
l = {
0x55
}
m = "invokeSuspend"
.end annotation
# instance fields
.field final synthetic $transform:Lkotlin/jvm/functions/Function2;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function2;"
}
.end annotation
.end field
.field synthetic L$0:Ljava/lang/Object;
.field label:I
# direct methods
.method public constructor <init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function2;",
"Lkotlin/coroutines/Continuation;",
")V"
}
.end annotation
iput-object p1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->$transform:Lkotlin/jvm/functions/Function2;
const/4 p1, 0x2
invoke-direct {p0, p1, p2}, Lkotlin/coroutines/jvm/internal/SuspendLambda;-><init>(ILkotlin/coroutines/Continuation;)V
return-void
.end method
# virtual methods
.method public final create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlin/coroutines/Continuation;",
")",
"Lkotlin/coroutines/Continuation;"
}
.end annotation
new-instance v0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;
iget-object v1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->$transform:Lkotlin/jvm/functions/Function2;
invoke-direct {v0, v1, p2}, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;-><init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
iput-object p1, v0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->L$0:Ljava/lang/Object;
return-object v0
.end method
.method public final invoke(Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
.line 0
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object p1
check-cast p1, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;
sget-object p2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
invoke-virtual {p1, p2}, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.line 0
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
check-cast p2, Lkotlin/coroutines/Continuation;
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->invoke(Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
.locals 3
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v0
iget v1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->label:I
const/4 v2, 0x1
if-eqz v1, :cond_1
if-ne v1, v2, :cond_0
.line 84
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_0
.line 91
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 84
:cond_1
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
iget-object p1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->L$0:Ljava/lang/Object;
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
iget-object v1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->$transform:Lkotlin/jvm/functions/Function2;
iput v2, p0, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;->label:I
.line 85
invoke-interface {v1, p1, p0}, Lkotlin/jvm/functions/Function2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
if-ne p1, v0, :cond_2
return-object v0
.line 84
:cond_2
:goto_0
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
.line 90
move-object v0, p1
check-cast v0, Landroidx/datastore/preferences/core/MutablePreferences;
invoke-virtual {v0}, Landroidx/datastore/preferences/core/MutablePreferences;->freeze$datastore_preferences_core()V
return-object p1
.end method

View File

@@ -0,0 +1,102 @@
.class public final Landroidx/datastore/preferences/core/PreferenceDataStore;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroidx/datastore/core/DataStore;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
# instance fields
.field private final delegate:Landroidx/datastore/core/DataStore;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroidx/datastore/core/DataStore;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;)V"
}
.end annotation
const-string v0, "delegate"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 80
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/datastore/preferences/core/PreferenceDataStore;->delegate:Landroidx/datastore/core/DataStore;
return-void
.end method
# virtual methods
.method public getData()Lkotlinx/coroutines/flow/Flow;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lkotlinx/coroutines/flow/Flow;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/PreferenceDataStore;->delegate:Landroidx/datastore/core/DataStore;
invoke-interface {v0}, Landroidx/datastore/core/DataStore;->getData()Lkotlinx/coroutines/flow/Flow;
move-result-object v0
return-object v0
.end method
.method public updateData(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function2;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/PreferenceDataStore;->delegate:Landroidx/datastore/core/DataStore;
.line 84
new-instance v1, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;
const/4 v2, 0x0
invoke-direct {v1, p1, v2}, Landroidx/datastore/preferences/core/PreferenceDataStore$updateData$2;-><init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
invoke-interface {v0, v1, p2}, Landroidx/datastore/core/DataStore;->updateData(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,139 @@
.class final Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;
.super Lkotlin/jvm/internal/Lambda;
.source "SourceFile"
# interfaces
.implements Lkotlin/jvm/functions/Function0;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->create(Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/internal/Lambda;",
"Lkotlin/jvm/functions/Function0;"
}
.end annotation
# instance fields
.field final synthetic $produceFile:Lkotlin/jvm/functions/Function0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function0;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lkotlin/jvm/functions/Function0;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function0;",
")V"
}
.end annotation
iput-object p1, p0, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;->$produceFile:Lkotlin/jvm/functions/Function0;
const/4 p1, 0x0
invoke-direct {p0, p1}, Lkotlin/jvm/internal/Lambda;-><init>(I)V
return-void
.end method
# virtual methods
.method public final invoke()Ljava/io/File;
.locals 4
iget-object v0, p0, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;->$produceFile:Lkotlin/jvm/functions/Function0;
.line 69
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/io/File;
.line 70
invoke-static {v0}, Lkotlin/io/FilesKt;->getExtension(Ljava/io/File;)Ljava/lang/String;
move-result-object v1
sget-object v2, Landroidx/datastore/preferences/core/PreferencesSerializer;->INSTANCE:Landroidx/datastore/preferences/core/PreferencesSerializer;
invoke-virtual {v2}, Landroidx/datastore/preferences/core/PreferencesSerializer;->getFileExtension()Ljava/lang/String;
move-result-object v3
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
return-object v0
.line 71
:cond_0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "File extension for file: "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v0, " does not match required extension for Preferences file: "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 72
invoke-virtual {v2}, Landroidx/datastore/preferences/core/PreferencesSerializer;->getFileExtension()Ljava/lang/String;
move-result-object v0
.line 71
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 70
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public bridge synthetic invoke()Ljava/lang/Object;
.locals 1
.line 68
invoke-virtual {p0}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;->invoke()Ljava/io/File;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,282 @@
.class public final Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final INSTANCE:Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;
invoke-direct {v0}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;-><init>()V
sput-object v0, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->INSTANCE:Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 32
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic create$default(Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/datastore/core/DataStore;
.locals 1
and-int/lit8 p6, p5, 0x1
const/4 v0, 0x0
if-eqz p6, :cond_0
move-object p1, v0
:cond_0
and-int/lit8 p6, p5, 0x2
if-eqz p6, :cond_1
.line 59
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
move-result-object p2
:cond_1
and-int/lit8 p5, p5, 0x4
if-eqz p5, :cond_2
.line 60
invoke-static {}, Lkotlinx/coroutines/Dispatchers;->getIO()Lkotlinx/coroutines/CoroutineDispatcher;
move-result-object p3
const/4 p5, 0x1
invoke-static {v0, p5, v0}, Lkotlinx/coroutines/SupervisorKt;->SupervisorJob$default(Lkotlinx/coroutines/Job;ILjava/lang/Object;)Lkotlinx/coroutines/CompletableJob;
move-result-object p5
invoke-virtual {p3, p5}, Lkotlin/coroutines/AbstractCoroutineContextElement;->plus(Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
move-result-object p3
invoke-static {p3}, Lkotlinx/coroutines/CoroutineScopeKt;->CoroutineScope(Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/CoroutineScope;
move-result-object p3
.line 57
:cond_2
invoke-virtual {p0, p1, p2, p3, p4}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->create(Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public final create(Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler<",
"Landroidx/datastore/preferences/core/Preferences;",
">;",
"Ljava/util/List<",
"+",
"Landroidx/datastore/core/DataMigration<",
"Landroidx/datastore/preferences/core/Preferences;",
">;>;",
"Lkotlin/jvm/functions/Function0;",
")",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
.line 0
const-string v0, "migrations"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "produceFile"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v4, 0x0
const/4 v6, 0x4
const/4 v7, 0x0
move-object v1, p0
move-object v2, p1
move-object v3, p2
move-object v5, p3
invoke-static/range {v1 .. v7}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->create$default(Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/datastore/core/DataStore;
move-result-object p1
return-object p1
.end method
.method public final create(Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler<",
"Landroidx/datastore/preferences/core/Preferences;",
">;",
"Ljava/util/List<",
"+",
"Landroidx/datastore/core/DataMigration<",
"Landroidx/datastore/preferences/core/Preferences;",
">;>;",
"Lkotlinx/coroutines/CoroutineScope;",
"Lkotlin/jvm/functions/Function0;",
")",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
const-string v0, "migrations"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "scope"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "produceFile"
invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 63
sget-object v1, Landroidx/datastore/core/DataStoreFactory;->INSTANCE:Landroidx/datastore/core/DataStoreFactory;
.line 64
sget-object v2, Landroidx/datastore/preferences/core/PreferencesSerializer;->INSTANCE:Landroidx/datastore/preferences/core/PreferencesSerializer;
.line 68
new-instance v6, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;
invoke-direct {v6, p4}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory$create$delegate$1;-><init>(Lkotlin/jvm/functions/Function0;)V
move-object v3, p1
move-object v4, p2
move-object v5, p3
.line 63
invoke-virtual/range {v1 .. v6}, Landroidx/datastore/core/DataStoreFactory;->create(Landroidx/datastore/core/Serializer;Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
move-result-object p1
.line 76
new-instance p2, Landroidx/datastore/preferences/core/PreferenceDataStore;
invoke-direct {p2, p1}, Landroidx/datastore/preferences/core/PreferenceDataStore;-><init>(Landroidx/datastore/core/DataStore;)V
return-object p2
.end method
.method public final create(Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler<",
"Landroidx/datastore/preferences/core/Preferences;",
">;",
"Lkotlin/jvm/functions/Function0;",
")",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
.line 0
const-string v0, "produceFile"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v6, 0x6
const/4 v7, 0x0
move-object v1, p0
move-object v2, p1
move-object v5, p2
invoke-static/range {v1 .. v7}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->create$default(Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/datastore/core/DataStore;
move-result-object p1
return-object p1
.end method
.method public final create(Lkotlin/jvm/functions/Function0;)Landroidx/datastore/core/DataStore;
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function0;",
")",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
.line 0
const-string v0, "produceFile"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v6, 0x7
const/4 v7, 0x0
move-object v1, p0
move-object v5, p1
invoke-static/range {v1 .. v7}, Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;->create$default(Landroidx/datastore/preferences/core/PreferenceDataStoreFactory;Landroidx/datastore/core/handlers/ReplaceFileCorruptionHandler;Ljava/util/List;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/datastore/core/DataStore;
move-result-object p1
return-object p1
.end method

View File

@@ -0,0 +1,121 @@
.class public final Landroidx/datastore/preferences/core/Preferences$Key;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/datastore/preferences/core/Preferences;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Key"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private final name:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.locals 1
const-string v0, "name"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 37
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 1
.line 47
instance-of v0, p1, Landroidx/datastore/preferences/core/Preferences$Key;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
.line 48
check-cast p1, Landroidx/datastore/preferences/core/Preferences$Key;
iget-object p1, p1, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
invoke-static {v0, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public final getName()Ljava/lang/String;
.locals 1
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
return-object v0
.end method
.method public hashCode()I
.locals 1
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
.line 54
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
move-result v0
return v0
.end method
.method public final to(Ljava/lang/Object;)Landroidx/datastore/preferences/core/Preferences$Pair;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)",
"Landroidx/datastore/preferences/core/Preferences$Pair<",
"TT;>;"
}
.end annotation
.line 44
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Pair;
invoke-direct {v0, p0, p1}, Landroidx/datastore/preferences/core/Preferences$Pair;-><init>(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 1
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Key;->name:Ljava/lang/String;
return-object v0
.end method

View File

@@ -0,0 +1,98 @@
.class public final Landroidx/datastore/preferences/core/Preferences$Pair;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/datastore/preferences/core/Preferences;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Pair"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private final key:Landroidx/datastore/preferences/core/Preferences$Key;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;"
}
.end annotation
.end field
.field private final value:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;TT;)V"
}
.end annotation
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 65
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/datastore/preferences/core/Preferences$Pair;->key:Landroidx/datastore/preferences/core/Preferences$Key;
iput-object p2, p0, Landroidx/datastore/preferences/core/Preferences$Pair;->value:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public final getKey$datastore_preferences_core()Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Pair;->key:Landroidx/datastore/preferences/core/Preferences$Key;
return-object v0
.end method
.method public final getValue$datastore_preferences_core()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
iget-object v0, p0, Landroidx/datastore/preferences/core/Preferences$Pair;->value:Ljava/lang/Object;
return-object v0
.end method

View File

@@ -0,0 +1,104 @@
.class public abstract Landroidx/datastore/preferences/core/Preferences;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/datastore/preferences/core/Preferences$Key;,
Landroidx/datastore/preferences/core/Preferences$Pair;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 27
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public abstract asMap()Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"*>;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end method
.method public abstract contains(Landroidx/datastore/preferences/core/Preferences$Key;)Z
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;)Z"
}
.end annotation
.end method
.method public abstract get(Landroidx/datastore/preferences/core/Preferences$Key;)Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"TT;>;)TT;"
}
.end annotation
.end method
.method public final toMutablePreferences()Landroidx/datastore/preferences/core/MutablePreferences;
.locals 3
.line 108
new-instance v0, Landroidx/datastore/preferences/core/MutablePreferences;
invoke-virtual {p0}, Landroidx/datastore/preferences/core/Preferences;->asMap()Ljava/util/Map;
move-result-object v1
invoke-static {v1}, Lkotlin/collections/MapsKt;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v1
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;Z)V
return-object v0
.end method
.method public final toPreferences()Landroidx/datastore/preferences/core/Preferences;
.locals 3
.line 119
new-instance v0, Landroidx/datastore/preferences/core/MutablePreferences;
invoke-virtual {p0}, Landroidx/datastore/preferences/core/Preferences;->asMap()Ljava/util/Map;
move-result-object v1
invoke-static {v1}, Lkotlin/collections/MapsKt;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
move-result-object v1
const/4 v2, 0x1
invoke-direct {v0, v1, v2}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;Z)V
return-object v0
.end method

View File

@@ -0,0 +1,90 @@
.class public final Landroidx/datastore/preferences/core/PreferencesFactory;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static final varargs create([Landroidx/datastore/preferences/core/Preferences$Pair;)Landroidx/datastore/preferences/core/Preferences;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Landroidx/datastore/preferences/core/Preferences$Pair<",
"*>;)",
"Landroidx/datastore/preferences/core/Preferences;"
}
.end annotation
const-string v0, "pairs"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 42
array-length v0, p0
invoke-static {p0, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object p0
check-cast p0, [Landroidx/datastore/preferences/core/Preferences$Pair;
invoke-static {p0}, Landroidx/datastore/preferences/core/PreferencesFactory;->createMutable([Landroidx/datastore/preferences/core/Preferences$Pair;)Landroidx/datastore/preferences/core/MutablePreferences;
move-result-object p0
return-object p0
.end method
.method public static final createEmpty()Landroidx/datastore/preferences/core/Preferences;
.locals 3
.line 27
new-instance v0, Landroidx/datastore/preferences/core/MutablePreferences;
const/4 v1, 0x0
const/4 v2, 0x1
invoke-direct {v0, v1, v2, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v0
.end method
.method public static final varargs createMutable([Landroidx/datastore/preferences/core/Preferences$Pair;)Landroidx/datastore/preferences/core/MutablePreferences;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Landroidx/datastore/preferences/core/Preferences$Pair<",
"*>;)",
"Landroidx/datastore/preferences/core/MutablePreferences;"
}
.end annotation
const-string v0, "pairs"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 56
new-instance v0, Landroidx/datastore/preferences/core/MutablePreferences;
const/4 v1, 0x0
const/4 v2, 0x1
const/4 v3, 0x0
invoke-direct {v0, v3, v1, v2, v3}, Landroidx/datastore/preferences/core/MutablePreferences;-><init>(Ljava/util/Map;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
array-length v1, p0
invoke-static {p0, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object p0
check-cast p0, [Landroidx/datastore/preferences/core/Preferences$Pair;
invoke-virtual {v0, p0}, Landroidx/datastore/preferences/core/MutablePreferences;->putAll([Landroidx/datastore/preferences/core/Preferences$Pair;)V
return-object v0
.end method

View File

@@ -0,0 +1,181 @@
.class public final Landroidx/datastore/preferences/core/PreferencesKeys;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static final booleanKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 63
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final doubleKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/Double;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 41
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final floatKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/Float;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 74
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final intKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 30
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final longKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/Long;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 85
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final stringKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/lang/String;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 52
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method
.method public static final stringSetKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Landroidx/datastore/preferences/core/Preferences$Key<",
"Ljava/util/Set<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
const-string v0, "name"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 99
new-instance v0, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-direct {v0, p0}, Landroidx/datastore/preferences/core/Preferences$Key;-><init>(Ljava/lang/String;)V
return-object v0
.end method

View File

@@ -0,0 +1,205 @@
.class final Landroidx/datastore/preferences/core/PreferencesKt$edit$2;
.super Lkotlin/coroutines/jvm/internal/SuspendLambda;
.source "SourceFile"
# interfaces
.implements Lkotlin/jvm/functions/Function2;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/datastore/preferences/core/PreferencesKt;->edit(Landroidx/datastore/core/DataStore;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/coroutines/jvm/internal/SuspendLambda;",
"Lkotlin/jvm/functions/Function2;"
}
.end annotation
.annotation runtime Lkotlin/coroutines/jvm/internal/DebugMetadata;
c = "androidx.datastore.preferences.core.PreferencesKt$edit$2"
f = "Preferences.kt"
l = {
0x149
}
m = "invokeSuspend"
.end annotation
# instance fields
.field final synthetic $transform:Lkotlin/jvm/functions/Function2;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function2;"
}
.end annotation
.end field
.field synthetic L$0:Ljava/lang/Object;
.field label:I
# direct methods
.method public constructor <init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function2;",
"Lkotlin/coroutines/Continuation;",
")V"
}
.end annotation
iput-object p1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->$transform:Lkotlin/jvm/functions/Function2;
const/4 p1, 0x2
invoke-direct {p0, p1, p2}, Lkotlin/coroutines/jvm/internal/SuspendLambda;-><init>(ILkotlin/coroutines/Continuation;)V
return-void
.end method
# virtual methods
.method public final create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlin/coroutines/Continuation;",
")",
"Lkotlin/coroutines/Continuation;"
}
.end annotation
new-instance v0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;
iget-object v1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->$transform:Lkotlin/jvm/functions/Function2;
invoke-direct {v0, v1, p2}, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;-><init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
iput-object p1, v0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->L$0:Ljava/lang/Object;
return-object v0
.end method
.method public final invoke(Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
.line 0
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->create(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;
move-result-object p1
check-cast p1, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;
sget-object p2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
invoke-virtual {p1, p2}, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.line 0
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
check-cast p2, Lkotlin/coroutines/Continuation;
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->invoke(Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
.locals 3
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v0
iget v1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->label:I
const/4 v2, 0x1
if-eqz v1, :cond_1
if-ne v1, v2, :cond_0
iget-object v0, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->L$0:Ljava/lang/Object;
.line 326
check-cast v0, Landroidx/datastore/preferences/core/MutablePreferences;
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto :goto_0
.line 329
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 326
:cond_1
invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
iget-object p1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->L$0:Ljava/lang/Object;
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
.line 329
invoke-virtual {p1}, Landroidx/datastore/preferences/core/Preferences;->toMutablePreferences()Landroidx/datastore/preferences/core/MutablePreferences;
move-result-object p1
iget-object v1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->$transform:Lkotlin/jvm/functions/Function2;
iput-object p1, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->L$0:Ljava/lang/Object;
iput v2, p0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;->label:I
invoke-interface {v1, p1, p0}, Lkotlin/jvm/functions/Function2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
if-ne v1, v0, :cond_2
return-object v0
:cond_2
move-object v0, p1
:goto_0
return-object v0
.end method

View File

@@ -0,0 +1,34 @@
.class public final Landroidx/datastore/preferences/core/PreferencesKt;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static final edit(Landroidx/datastore/core/DataStore;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/core/DataStore<",
"Landroidx/datastore/preferences/core/Preferences;",
">;",
"Lkotlin/jvm/functions/Function2;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
.line 326
new-instance v0, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;
const/4 v1, 0x0
invoke-direct {v0, p1, v1}, Landroidx/datastore/preferences/core/PreferencesKt$edit$2;-><init>(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)V
invoke-interface {p0, v0, p2}, Landroidx/datastore/core/DataStore;->updateData(Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p0
return-object p0
.end method

View File

@@ -0,0 +1,116 @@
.class public final synthetic Landroidx/datastore/preferences/core/PreferencesSerializer$WhenMappings;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/datastore/preferences/core/PreferencesSerializer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1001
name = "WhenMappings"
.end annotation
# static fields
.field public static final synthetic $EnumSwitchMapping$0:[I
# direct methods
.method static constructor <clinit>()V
.locals 3
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->values()[Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->BOOLEAN:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->FLOAT:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->DOUBLE:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->INTEGER:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->LONG:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x5
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->STRING:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x6
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->STRING_SET:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x7
aput v2, v0, v1
sget-object v1, Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;->VALUE_NOT_SET:Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/16 v2, 0x8
aput v2, v0, v1
sput-object v0, Landroidx/datastore/preferences/core/PreferencesSerializer$WhenMappings;->$EnumSwitchMapping$0:[I
return-void
.end method

View File

@@ -0,0 +1,768 @@
.class public final Landroidx/datastore/preferences/core/PreferencesSerializer;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroidx/datastore/core/Serializer;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/datastore/preferences/core/PreferencesSerializer$WhenMappings;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Landroidx/datastore/core/Serializer<",
"Landroidx/datastore/preferences/core/Preferences;",
">;"
}
.end annotation
# static fields
.field public static final INSTANCE:Landroidx/datastore/preferences/core/PreferencesSerializer;
.field private static final fileExtension:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Landroidx/datastore/preferences/core/PreferencesSerializer;
invoke-direct {v0}, Landroidx/datastore/preferences/core/PreferencesSerializer;-><init>()V
sput-object v0, Landroidx/datastore/preferences/core/PreferencesSerializer;->INSTANCE:Landroidx/datastore/preferences/core/PreferencesSerializer;
const-string v0, "preferences_pb"
sput-object v0, Landroidx/datastore/preferences/core/PreferencesSerializer;->fileExtension:Ljava/lang/String;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 36
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private final addProtoEntryToPreferences(Ljava/lang/String;Landroidx/datastore/preferences/PreferencesProto$Value;Landroidx/datastore/preferences/core/MutablePreferences;)V
.locals 3
.line 93
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getValueCase()Landroidx/datastore/preferences/PreferencesProto$Value$ValueCase;
move-result-object v0
if-nez v0, :cond_0
const/4 v0, -0x1
goto :goto_0
:cond_0
sget-object v1, Landroidx/datastore/preferences/core/PreferencesSerializer$WhenMappings;->$EnumSwitchMapping$0:[I
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
move-result v0
aget v0, v1, v0
:goto_0
const/4 v1, 0x2
const/4 v2, 0x0
packed-switch v0, :pswitch_data_0
.line 107
:pswitch_0
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
throw p1
.line 106
:pswitch_1
new-instance p1, Landroidx/datastore/core/CorruptionException;
const-string p2, "Value not set."
invoke-direct {p1, p2, v2, v1, v2}, Landroidx/datastore/core/CorruptionException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
throw p1
.line 103
:pswitch_2
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->stringSetKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
.line 104
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getStringSet()Landroidx/datastore/preferences/PreferencesProto$StringSet;
move-result-object p2
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$StringSet;->getStringsList()Ljava/util/List;
move-result-object p2
const-string v0, "value.stringSet.stringsList"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p2, Ljava/lang/Iterable;
invoke-static {p2}, Lkotlin/collections/CollectionsKt;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
move-result-object p2
.line 103
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 101
:pswitch_3
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->stringKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getString()Ljava/lang/String;
move-result-object p2
const-string v0, "value.string"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 100
:pswitch_4
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->longKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getLong()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p2
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 99
:pswitch_5
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->intKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getInteger()I
move-result p2
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p2
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 98
:pswitch_6
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->doubleKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getDouble()D
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object p2
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 97
:pswitch_7
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->floatKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getFloat()F
move-result p2
invoke-static {p2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object p2
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
goto :goto_1
.line 95
:pswitch_8
invoke-static {p1}, Landroidx/datastore/preferences/core/PreferencesKeys;->booleanKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key;
move-result-object p1
.line 96
invoke-virtual {p2}, Landroidx/datastore/preferences/PreferencesProto$Value;->getBoolean()Z
move-result p2
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p2
.line 95
invoke-virtual {p3, p1, p2}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V
:goto_1
return-void
.line 107
:pswitch_9
new-instance p1, Landroidx/datastore/core/CorruptionException;
const-string p2, "Value case is null."
invoke-direct {p1, p2, v2, v1, v2}, Landroidx/datastore/core/CorruptionException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
throw p1
nop
:pswitch_data_0
.packed-switch -0x1
:pswitch_9
:pswitch_0
:pswitch_8
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
.end packed-switch
.end method
.method private final getValueProto(Ljava/lang/Object;)Landroidx/datastore/preferences/PreferencesProto$Value;
.locals 3
.line 71
instance-of v0, p1, Ljava/lang/Boolean;
if-eqz v0, :cond_0
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/Boolean;
invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z
move-result p1
invoke-virtual {v0, p1}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setBoolean(Z)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setBoolean(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto/16 :goto_0
.line 72
:cond_0
instance-of v0, p1, Ljava/lang/Float;
if-eqz v0, :cond_1
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/Number;
invoke-virtual {p1}, Ljava/lang/Number;->floatValue()F
move-result p1
invoke-virtual {v0, p1}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setFloat(F)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setFloat(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto/16 :goto_0
.line 73
:cond_1
instance-of v0, p1, Ljava/lang/Double;
if-eqz v0, :cond_2
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/Number;
invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setDouble(D)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setDouble(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto/16 :goto_0
.line 74
:cond_2
instance-of v0, p1, Ljava/lang/Integer;
if-eqz v0, :cond_3
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/Number;
invoke-virtual {p1}, Ljava/lang/Number;->intValue()I
move-result p1
invoke-virtual {v0, p1}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setInteger(I)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setInteger(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto :goto_0
.line 75
:cond_3
instance-of v0, p1, Ljava/lang/Long;
if-eqz v0, :cond_4
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/Number;
invoke-virtual {p1}, Ljava/lang/Number;->longValue()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setLong(J)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setLong(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto :goto_0
.line 76
:cond_4
instance-of v0, p1, Ljava/lang/String;
if-eqz v0, :cond_5
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
check-cast p1, Ljava/lang/String;
invoke-virtual {v0, p1}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setString(Ljava/lang/String;)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setString(value).build()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
goto :goto_0
.line 77
:cond_5
instance-of v0, p1, Ljava/util/Set;
if-eqz v0, :cond_6
.line 79
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$Value;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object v0
.line 80
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$StringSet;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$StringSet$Builder;
move-result-object v1
check-cast p1, Ljava/util/Set;
invoke-virtual {v1, p1}, Landroidx/datastore/preferences/PreferencesProto$StringSet$Builder;->addAllStrings(Ljava/lang/Iterable;)Landroidx/datastore/preferences/PreferencesProto$StringSet$Builder;
move-result-object p1
.line 79
invoke-virtual {v0, p1}, Landroidx/datastore/preferences/PreferencesProto$Value$Builder;->setStringSet(Landroidx/datastore/preferences/PreferencesProto$StringSet$Builder;)Landroidx/datastore/preferences/PreferencesProto$Value$Builder;
move-result-object p1
.line 81
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
const-string v0, "newBuilder().setStringSet(\n StringSet.newBuilder().addAllStrings(value as Set<String>)\n ).build()"
.line 80
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$Value;
:goto_0
return-object p1
.line 82
:cond_6
new-instance v0, Ljava/lang/IllegalStateException;
.line 83
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p1
const-string v1, "PreferencesSerializer does not support type: "
invoke-static {v1, p1}, Lkotlin/jvm/internal/Intrinsics;->stringPlus(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
.line 82
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public getDefaultValue()Landroidx/datastore/preferences/core/Preferences;
.locals 1
.line 41
invoke-static {}, Landroidx/datastore/preferences/core/PreferencesFactory;->createEmpty()Landroidx/datastore/preferences/core/Preferences;
move-result-object v0
return-object v0
.end method
.method public bridge synthetic getDefaultValue()Ljava/lang/Object;
.locals 1
.line 36
invoke-virtual {p0}, Landroidx/datastore/preferences/core/PreferencesSerializer;->getDefaultValue()Landroidx/datastore/preferences/core/Preferences;
move-result-object v0
return-object v0
.end method
.method public final getFileExtension()Ljava/lang/String;
.locals 1
sget-object v0, Landroidx/datastore/preferences/core/PreferencesSerializer;->fileExtension:Ljava/lang/String;
return-object v0
.end method
.method public readFrom(Ljava/io/InputStream;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/InputStream;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Landroidx/datastore/core/CorruptionException;
}
.end annotation
.line 46
sget-object p2, Landroidx/datastore/preferences/PreferencesMapCompat;->Companion:Landroidx/datastore/preferences/PreferencesMapCompat$Companion;
invoke-virtual {p2, p1}, Landroidx/datastore/preferences/PreferencesMapCompat$Companion;->readFrom(Ljava/io/InputStream;)Landroidx/datastore/preferences/PreferencesProto$PreferenceMap;
move-result-object p1
const/4 p2, 0x0
new-array p2, p2, [Landroidx/datastore/preferences/core/Preferences$Pair;
.line 48
invoke-static {p2}, Landroidx/datastore/preferences/core/PreferencesFactory;->createMutable([Landroidx/datastore/preferences/core/Preferences$Pair;)Landroidx/datastore/preferences/core/MutablePreferences;
move-result-object p2
.line 50
invoke-virtual {p1}, Landroidx/datastore/preferences/PreferencesProto$PreferenceMap;->getPreferencesMap()Ljava/util/Map;
move-result-object p1
const-string v0, "preferencesProto.preferencesMap"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 111
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p1
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
.line 50
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/datastore/preferences/PreferencesProto$Value;
sget-object v2, Landroidx/datastore/preferences/core/PreferencesSerializer;->INSTANCE:Landroidx/datastore/preferences/core/PreferencesSerializer;
const-string v3, "name"
.line 51
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
const-string v3, "value"
invoke-static {v0, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {v2, v1, v0, p2}, Landroidx/datastore/preferences/core/PreferencesSerializer;->addProtoEntryToPreferences(Ljava/lang/String;Landroidx/datastore/preferences/PreferencesProto$Value;Landroidx/datastore/preferences/core/MutablePreferences;)V
goto :goto_0
.line 54
:cond_0
invoke-virtual {p2}, Landroidx/datastore/preferences/core/Preferences;->toPreferences()Landroidx/datastore/preferences/core/Preferences;
move-result-object p1
return-object p1
.end method
.method public writeTo(Landroidx/datastore/preferences/core/Preferences;Ljava/io/OutputStream;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/datastore/preferences/core/Preferences;",
"Ljava/io/OutputStream;",
"Lkotlin/coroutines/Continuation;",
")",
"Ljava/lang/Object;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Landroidx/datastore/core/CorruptionException;
}
.end annotation
.line 59
invoke-virtual {p1}, Landroidx/datastore/preferences/core/Preferences;->asMap()Ljava/util/Map;
move-result-object p1
.line 60
invoke-static {}, Landroidx/datastore/preferences/PreferencesProto$PreferenceMap;->newBuilder()Landroidx/datastore/preferences/PreferencesProto$PreferenceMap$Builder;
move-result-object p3
.line 62
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object p1
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/datastore/preferences/core/Preferences$Key;
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v0
.line 63
invoke-virtual {v1}, Landroidx/datastore/preferences/core/Preferences$Key;->getName()Ljava/lang/String;
move-result-object v1
invoke-direct {p0, v0}, Landroidx/datastore/preferences/core/PreferencesSerializer;->getValueProto(Ljava/lang/Object;)Landroidx/datastore/preferences/PreferencesProto$Value;
move-result-object v0
invoke-virtual {p3, v1, v0}, Landroidx/datastore/preferences/PreferencesProto$PreferenceMap$Builder;->putPreferences(Ljava/lang/String;Landroidx/datastore/preferences/PreferencesProto$Value;)Landroidx/datastore/preferences/PreferencesProto$PreferenceMap$Builder;
goto :goto_0
.line 66
:cond_0
invoke-virtual {p3}, Landroidx/datastore/preferences/protobuf/GeneratedMessageLite$Builder;->build()Landroidx/datastore/preferences/protobuf/GeneratedMessageLite;
move-result-object p1
check-cast p1, Landroidx/datastore/preferences/PreferencesProto$PreferenceMap;
invoke-virtual {p1, p2}, Landroidx/datastore/preferences/protobuf/AbstractMessageLite;->writeTo(Ljava/io/OutputStream;)V
.line 67
sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
return-object p1
.end method
.method public bridge synthetic writeTo(Ljava/lang/Object;Ljava/io/OutputStream;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.locals 0
.line 36
check-cast p1, Landroidx/datastore/preferences/core/Preferences;
invoke-virtual {p0, p1, p2, p3}, Landroidx/datastore/preferences/core/PreferencesSerializer;->writeTo(Landroidx/datastore/preferences/core/Preferences;Ljava/io/OutputStream;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method