Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

View File

@@ -0,0 +1,145 @@
package v0;
import C.w;
import android.os.Bundle;
import androidx.lifecycle.A;
import androidx.lifecycle.C0;
import androidx.lifecycle.C0201w;
import androidx.lifecycle.D0;
import androidx.lifecycle.H;
import androidx.lifecycle.InterfaceC0199u;
import androidx.lifecycle.J;
import androidx.lifecycle.q0;
import androidx.lifecycle.r0;
import androidx.lifecycle.w0;
import b.o;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import kotlin.jvm.internal.Intrinsics;
/* renamed from: v0.a, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0636a implements H {
/* renamed from: a, reason: collision with root package name */
public final /* synthetic */ int f8627a = 2;
/* renamed from: b, reason: collision with root package name */
public final Object f8628b;
public C0636a(InterfaceC0199u[] generatedAdapters) {
Intrinsics.checkNotNullParameter(generatedAdapters, "generatedAdapters");
this.f8628b = generatedAdapters;
}
@Override // androidx.lifecycle.H
public final void onStateChanged(J source, A event) {
switch (this.f8627a) {
case 0:
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
if (event != A.ON_CREATE) {
throw new AssertionError("Next event must be ON_CREATE");
}
source.getLifecycle().c(this);
f owner = (f) this.f8628b;
Bundle a2 = owner.getSavedStateRegistry().a("androidx.savedstate.Restarter");
if (a2 == null) {
return;
}
ArrayList<String> stringArrayList = a2.getStringArrayList("classes_to_restore");
if (stringArrayList == null) {
throw new IllegalStateException("Bundle with restored state for the component \"androidx.savedstate.Restarter\" must contain list of strings by the key \"classes_to_restore\"");
}
for (String str : stringArrayList) {
try {
Class<? extends U> asSubclass = Class.forName(str, false, C0636a.class.getClassLoader()).asSubclass(InterfaceC0637b.class);
Intrinsics.checkNotNullExpressionValue(asSubclass, "{\n Class.…class.java)\n }");
try {
Constructor declaredConstructor = asSubclass.getDeclaredConstructor(new Class[0]);
declaredConstructor.setAccessible(true);
try {
Object newInstance = declaredConstructor.newInstance(new Object[0]);
Intrinsics.checkNotNullExpressionValue(newInstance, "{\n constr…wInstance()\n }");
((C0201w) ((InterfaceC0637b) newInstance)).getClass();
Intrinsics.checkNotNullParameter(owner, "owner");
if (!(owner instanceof D0)) {
throw new IllegalStateException("Internal error: OnRecreation should be registered only on components that implement ViewModelStoreOwner");
}
C0 viewModelStore = ((D0) owner).getViewModelStore();
C0639d savedStateRegistry = owner.getSavedStateRegistry();
viewModelStore.getClass();
LinkedHashMap linkedHashMap = viewModelStore.f3288a;
Iterator it = new HashSet(linkedHashMap.keySet()).iterator();
while (it.hasNext()) {
String key = (String) it.next();
Intrinsics.checkNotNullParameter(key, "key");
w0 w0Var = (w0) linkedHashMap.get(key);
Intrinsics.checkNotNull(w0Var);
q0.b(w0Var, savedStateRegistry, owner.getLifecycle());
}
if (!new HashSet(linkedHashMap.keySet()).isEmpty()) {
savedStateRegistry.d();
}
} catch (Exception e4) {
throw new RuntimeException(w.z("Failed to instantiate ", str), e4);
}
} catch (NoSuchMethodException e5) {
throw new IllegalStateException("Class " + asSubclass.getSimpleName() + " must have default constructor in order to be automatically recreated", e5);
}
} catch (ClassNotFoundException e6) {
throw new RuntimeException(w.o("Class ", str, " wasn't found"), e6);
}
}
return;
case 1:
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
new HashMap();
InterfaceC0199u[] interfaceC0199uArr = (InterfaceC0199u[]) this.f8628b;
if (interfaceC0199uArr.length > 0) {
InterfaceC0199u interfaceC0199u = interfaceC0199uArr[0];
throw null;
}
if (interfaceC0199uArr.length <= 0) {
return;
}
InterfaceC0199u interfaceC0199u2 = interfaceC0199uArr[0];
throw null;
case 2:
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
if (event != A.ON_CREATE) {
throw new IllegalStateException(("Next event must be ON_CREATE, it was " + event).toString());
}
source.getLifecycle().c(this);
((r0) this.f8628b).c();
return;
default:
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
o oVar = (o) this.f8628b;
o.access$ensureViewModelStore(oVar);
oVar.getLifecycle().c(this);
return;
}
}
public C0636a(f owner) {
Intrinsics.checkNotNullParameter(owner, "owner");
this.f8628b = owner;
}
public C0636a(r0 provider) {
Intrinsics.checkNotNullParameter(provider, "provider");
this.f8628b = provider;
}
public C0636a(o oVar) {
this.f8628b = oVar;
}
}

View File

@@ -0,0 +1,106 @@
package v0;
import android.os.Bundle;
import androidx.lifecycle.C0201w;
import g.C0363j;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import o.C0516b;
import o.C0520f;
/* renamed from: v0.d, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0639d {
/* renamed from: b, reason: collision with root package name */
public boolean f8630b;
/* renamed from: c, reason: collision with root package name */
public Bundle f8631c;
/* renamed from: d, reason: collision with root package name */
public boolean f8632d;
/* renamed from: e, reason: collision with root package name */
public C0363j f8633e;
/* renamed from: a, reason: collision with root package name */
public final C0520f f8629a = new C0520f();
/* renamed from: f, reason: collision with root package name */
public boolean f8634f = true;
public final Bundle a(String key) {
Intrinsics.checkNotNullParameter(key, "key");
if (!this.f8632d) {
throw new IllegalStateException("You can consumeRestoredStateForKey only after super.onCreate of corresponding component");
}
Bundle bundle = this.f8631c;
if (bundle == null) {
return null;
}
Bundle bundle2 = bundle.getBundle(key);
Bundle bundle3 = this.f8631c;
if (bundle3 != null) {
bundle3.remove(key);
}
Bundle bundle4 = this.f8631c;
if (bundle4 != null && !bundle4.isEmpty()) {
return bundle2;
}
this.f8631c = null;
return bundle2;
}
public final InterfaceC0638c b() {
String str;
InterfaceC0638c interfaceC0638c;
Intrinsics.checkNotNullParameter("androidx.lifecycle.internal.SavedStateHandlesProvider", "key");
Iterator it = this.f8629a.iterator();
do {
C0516b c0516b = (C0516b) it;
if (!c0516b.hasNext()) {
return null;
}
Map.Entry components = (Map.Entry) c0516b.next();
Intrinsics.checkNotNullExpressionValue(components, "components");
str = (String) components.getKey();
interfaceC0638c = (InterfaceC0638c) components.getValue();
} while (!Intrinsics.areEqual(str, "androidx.lifecycle.internal.SavedStateHandlesProvider"));
return interfaceC0638c;
}
public final void c(String key, InterfaceC0638c provider) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(provider, "provider");
if (((InterfaceC0638c) this.f8629a.b(key, provider)) != null) {
throw new IllegalArgumentException("SavedStateProvider with the given key is already registered");
}
}
public final void d() {
Intrinsics.checkNotNullParameter(C0201w.class, "clazz");
if (!this.f8634f) {
throw new IllegalStateException("Can not perform this action after onSaveInstanceState");
}
C0363j c0363j = this.f8633e;
if (c0363j == null) {
c0363j = new C0363j(this);
}
this.f8633e = c0363j;
try {
C0201w.class.getDeclaredConstructor(new Class[0]);
C0363j c0363j2 = this.f8633e;
if (c0363j2 != null) {
String className = C0201w.class.getName();
Intrinsics.checkNotNullExpressionValue(className, "clazz.name");
Intrinsics.checkNotNullParameter(className, "className");
((LinkedHashSet) c0363j2.f6651b).add(className);
}
} catch (NoSuchMethodException e4) {
throw new IllegalArgumentException("Class " + C0201w.class.getSimpleName() + " must have default constructor in order to be automatically recreated", e4);
}
}
}

View File

@@ -0,0 +1,90 @@
package v0;
import android.os.Bundle;
import androidx.lifecycle.B;
import androidx.lifecycle.C;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import o.C0518d;
import o.C0520f;
import o0.C0539p;
/* renamed from: v0.e, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0640e {
/* renamed from: a, reason: collision with root package name */
public final f f8635a;
/* renamed from: b, reason: collision with root package name */
public final C0639d f8636b = new C0639d();
/* renamed from: c, reason: collision with root package name */
public boolean f8637c;
public C0640e(f fVar) {
this.f8635a = fVar;
}
public final void a() {
f fVar = this.f8635a;
C lifecycle = fVar.getLifecycle();
if (lifecycle.b() != B.f3281b) {
throw new IllegalStateException("Restarter must be created only during owner's initialization stage");
}
lifecycle.a(new C0636a(fVar));
C0639d c0639d = this.f8636b;
c0639d.getClass();
Intrinsics.checkNotNullParameter(lifecycle, "lifecycle");
if (c0639d.f8630b) {
throw new IllegalStateException("SavedStateRegistry was already attached.");
}
lifecycle.a(new C0539p(c0639d, 2));
c0639d.f8630b = true;
this.f8637c = true;
}
public final void b(Bundle bundle) {
if (!this.f8637c) {
a();
}
C lifecycle = this.f8635a.getLifecycle();
if (lifecycle.b().a(B.f3283d)) {
throw new IllegalStateException(("performRestore cannot be called when owner is " + lifecycle.b()).toString());
}
C0639d c0639d = this.f8636b;
if (!c0639d.f8630b) {
throw new IllegalStateException("You must call performAttach() before calling performRestore(Bundle).");
}
if (c0639d.f8632d) {
throw new IllegalStateException("SavedStateRegistry was already restored.");
}
c0639d.f8631c = bundle != null ? bundle.getBundle("androidx.lifecycle.BundlableSavedStateRegistry.key") : null;
c0639d.f8632d = true;
}
public final void c(Bundle outBundle) {
Intrinsics.checkNotNullParameter(outBundle, "outBundle");
C0639d c0639d = this.f8636b;
c0639d.getClass();
Intrinsics.checkNotNullParameter(outBundle, "outBundle");
Bundle bundle = new Bundle();
Bundle bundle2 = c0639d.f8631c;
if (bundle2 != null) {
bundle.putAll(bundle2);
}
C0520f c0520f = c0639d.f8629a;
c0520f.getClass();
C0518d c0518d = new C0518d(c0520f);
c0520f.f7896c.put(c0518d, Boolean.FALSE);
Intrinsics.checkNotNullExpressionValue(c0518d, "this.components.iteratorWithAdditions()");
while (c0518d.hasNext()) {
Map.Entry entry = (Map.Entry) c0518d.next();
bundle.putBundle((String) entry.getKey(), ((InterfaceC0638c) entry.getValue()).a());
}
if (bundle.isEmpty()) {
return;
}
outBundle.putBundle("androidx.lifecycle.BundlableSavedStateRegistry.key", bundle);
}
}

View File

@@ -0,0 +1,6 @@
package v0;
/* renamed from: v0.b, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public interface InterfaceC0637b {
}

View File

@@ -0,0 +1,9 @@
package v0;
import android.os.Bundle;
/* renamed from: v0.c, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public interface InterfaceC0638c {
Bundle a();
}

View File

@@ -0,0 +1,8 @@
package v0;
import androidx.lifecycle.J;
/* loaded from: classes.dex */
public interface f extends J {
C0639d getSavedStateRegistry();
}