Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
package androidx.datastore.migrations;
import android.content.SharedPreferences;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class SharedPreferencesView {
private final Set<String> keySet;
private final SharedPreferences prefs;
public SharedPreferencesView(SharedPreferences prefs, Set<String> set) {
Intrinsics.checkNotNullParameter(prefs, "prefs");
this.prefs = prefs;
this.keySet = set;
}
public final boolean contains(String key) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.contains(checkKey(key));
}
public final boolean getBoolean(String key, boolean z) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.getBoolean(checkKey(key), z);
}
public final float getFloat(String key, float f) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.getFloat(checkKey(key), f);
}
public final int getInt(String key, int i) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.getInt(checkKey(key), i);
}
public final long getLong(String key, long j) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.getLong(checkKey(key), j);
}
public static /* synthetic */ String getString$default(SharedPreferencesView sharedPreferencesView, String str, String str2, int i, Object obj) {
if ((i & 2) != 0) {
str2 = null;
}
return sharedPreferencesView.getString(str, str2);
}
public final String getString(String key, String str) {
Intrinsics.checkNotNullParameter(key, "key");
return this.prefs.getString(checkKey(key), str);
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Set getStringSet$default(SharedPreferencesView sharedPreferencesView, String str, Set set, int i, Object obj) {
if ((i & 2) != 0) {
set = null;
}
return sharedPreferencesView.getStringSet(str, set);
}
public final Set<String> getStringSet(String key, Set<String> set) {
Intrinsics.checkNotNullParameter(key, "key");
Set<String> stringSet = this.prefs.getStringSet(checkKey(key), set);
if (stringSet == null) {
return null;
}
return CollectionsKt___CollectionsKt.toMutableSet(stringSet);
}
public final Map<String, Object> getAll() {
int mapCapacity;
Map<String, ?> all = this.prefs.getAll();
Intrinsics.checkNotNullExpressionValue(all, "prefs.all");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Map.Entry<String, ?> entry : all.entrySet()) {
String key = entry.getKey();
Set<String> set = this.keySet;
if (set == null || set.contains(key)) {
linkedHashMap.put(entry.getKey(), entry.getValue());
}
}
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(linkedHashMap.size());
LinkedHashMap linkedHashMap2 = new LinkedHashMap(mapCapacity);
for (Map.Entry entry2 : linkedHashMap.entrySet()) {
Object key2 = entry2.getKey();
Object value = entry2.getValue();
if (value instanceof Set) {
value = CollectionsKt___CollectionsKt.toSet((Iterable) value);
}
linkedHashMap2.put(key2, value);
}
return linkedHashMap2;
}
private final String checkKey(String str) {
Set<String> set = this.keySet;
if (set == null || set.contains(str)) {
return str;
}
throw new IllegalStateException(Intrinsics.stringPlus("Can't access key outside migration: ", str).toString());
}
}