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,124 @@
package androidx.lifecycle;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.Closeable;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
/* loaded from: classes.dex */
public abstract class ViewModel {
@Nullable
private final Map<String, Object> mBagOfTags;
private volatile boolean mCleared;
@Nullable
private final Set<Closeable> mCloseables;
public void onCleared() {
}
public ViewModel() {
this.mBagOfTags = new HashMap();
this.mCloseables = new LinkedHashSet();
this.mCleared = false;
}
public ViewModel(@NonNull Closeable... closeableArr) {
this.mBagOfTags = new HashMap();
LinkedHashSet linkedHashSet = new LinkedHashSet();
this.mCloseables = linkedHashSet;
this.mCleared = false;
linkedHashSet.addAll(Arrays.asList(closeableArr));
}
public void addCloseable(@NonNull Closeable closeable) {
Set<Closeable> set = this.mCloseables;
if (set != null) {
synchronized (set) {
this.mCloseables.add(closeable);
}
}
}
@MainThread
public final void clear() {
this.mCleared = true;
Map<String, Object> map = this.mBagOfTags;
if (map != null) {
synchronized (map) {
try {
Iterator<Object> it = this.mBagOfTags.values().iterator();
while (it.hasNext()) {
closeWithRuntimeException(it.next());
}
} finally {
}
}
}
Set<Closeable> set = this.mCloseables;
if (set != null) {
synchronized (set) {
try {
Iterator<Closeable> it2 = this.mCloseables.iterator();
while (it2.hasNext()) {
closeWithRuntimeException(it2.next());
}
} finally {
}
}
}
onCleared();
}
/* JADX WARN: Multi-variable type inference failed */
public <T> T setTagIfAbsent(String str, T t) {
Object obj;
synchronized (this.mBagOfTags) {
try {
obj = this.mBagOfTags.get(str);
if (obj == 0) {
this.mBagOfTags.put(str, t);
}
} catch (Throwable th) {
throw th;
}
}
if (obj != 0) {
t = obj;
}
if (this.mCleared) {
closeWithRuntimeException(t);
}
return t;
}
public <T> T getTag(String str) {
T t;
Map<String, Object> map = this.mBagOfTags;
if (map == null) {
return null;
}
synchronized (map) {
t = (T) this.mBagOfTags.get(str);
}
return t;
}
private static void closeWithRuntimeException(Object obj) {
if (obj instanceof Closeable) {
try {
((Closeable) obj).close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
}