Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import b.o;
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.EntryPoints;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.internal.builders.ActivityComponentBuilder;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ActivityComponentManager implements GeneratedComponentManager<Object> {
|
||||
protected final Activity activity;
|
||||
private final GeneratedComponentManager<ActivityRetainedComponent> activityRetainedComponentManager;
|
||||
private volatile Object component;
|
||||
private final Object componentLock = new Object();
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ActivityComponentBuilderEntryPoint {
|
||||
ActivityComponentBuilder activityComponentBuilder();
|
||||
}
|
||||
|
||||
public ActivityComponentManager(Activity activity) {
|
||||
this.activity = activity;
|
||||
this.activityRetainedComponentManager = new ActivityRetainedComponentManager((o) activity);
|
||||
}
|
||||
|
||||
public Object createComponent() {
|
||||
String str;
|
||||
if (this.activity.getApplication() instanceof GeneratedComponentManager) {
|
||||
return ((ActivityComponentBuilderEntryPoint) EntryPoints.get(this.activityRetainedComponentManager, ActivityComponentBuilderEntryPoint.class)).activityComponentBuilder().activity(this.activity).build();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder("Hilt Activity must be attached to an @HiltAndroidApp Application. ");
|
||||
if (Application.class.equals(this.activity.getApplication().getClass())) {
|
||||
str = "Did you forget to specify your Application's class name in your manifest's <application />'s android:name attribute?";
|
||||
} else {
|
||||
str = "Found: " + this.activity.getApplication().getClass();
|
||||
}
|
||||
sb.append(str);
|
||||
throw new IllegalStateException(sb.toString());
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public Object generatedComponent() {
|
||||
if (this.component == null) {
|
||||
synchronized (this.componentLock) {
|
||||
try {
|
||||
if (this.component == null) {
|
||||
this.component = createComponent();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
|
||||
public final SavedStateHandleHolder getSavedStateHandleHolder() {
|
||||
return ((ActivityRetainedComponentManager) this.activityRetainedComponentManager).getSavedStateHandleHolder();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.lifecycle.B0;
|
||||
import androidx.lifecycle.D0;
|
||||
import androidx.lifecycle.w0;
|
||||
import androidx.lifecycle.y0;
|
||||
import b.o;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.EntryPoints;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.ActivityRetainedLifecycle;
|
||||
import dagger.hilt.android.EntryPointAccessors;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.internal.builders.ActivityRetainedComponentBuilder;
|
||||
import dagger.hilt.android.internal.lifecycle.RetainedLifecycleImpl;
|
||||
import dagger.hilt.android.scopes.ActivityRetainedScoped;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
import kotlin.jvm.JvmClassMappingKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.KClass;
|
||||
import l0.c;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class ActivityRetainedComponentManager implements GeneratedComponentManager<ActivityRetainedComponent> {
|
||||
private volatile ActivityRetainedComponent component;
|
||||
private final Object componentLock = new Object();
|
||||
private final Context context;
|
||||
private final D0 viewModelStoreOwner;
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({SingletonComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ActivityRetainedComponentBuilderEntryPoint {
|
||||
ActivityRetainedComponentBuilder retainedComponentBuilder();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ActivityRetainedComponentViewModel extends w0 {
|
||||
private final ActivityRetainedComponent component;
|
||||
private final SavedStateHandleHolder savedStateHandleHolder;
|
||||
|
||||
public ActivityRetainedComponentViewModel(ActivityRetainedComponent activityRetainedComponent, SavedStateHandleHolder savedStateHandleHolder) {
|
||||
this.component = activityRetainedComponent;
|
||||
this.savedStateHandleHolder = savedStateHandleHolder;
|
||||
}
|
||||
|
||||
public ActivityRetainedComponent getComponent() {
|
||||
return this.component;
|
||||
}
|
||||
|
||||
public SavedStateHandleHolder getSavedStateHandleHolder() {
|
||||
return this.savedStateHandleHolder;
|
||||
}
|
||||
|
||||
@Override // androidx.lifecycle.w0
|
||||
public void onCleared() {
|
||||
super.onCleared();
|
||||
((RetainedLifecycleImpl) ((ActivityRetainedLifecycleEntryPoint) EntryPoints.get(this.component, ActivityRetainedLifecycleEntryPoint.class)).getActivityRetainedLifecycle()).dispatchOnCleared();
|
||||
}
|
||||
}
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ActivityRetainedLifecycleEntryPoint {
|
||||
ActivityRetainedLifecycle getActivityRetainedLifecycle();
|
||||
}
|
||||
|
||||
@Module
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class LifecycleModule {
|
||||
@Provides
|
||||
@ActivityRetainedScoped
|
||||
public static ActivityRetainedLifecycle provideActivityRetainedLifecycle() {
|
||||
return new RetainedLifecycleImpl();
|
||||
}
|
||||
}
|
||||
|
||||
public ActivityRetainedComponentManager(o oVar) {
|
||||
this.viewModelStoreOwner = oVar;
|
||||
this.context = oVar;
|
||||
}
|
||||
|
||||
private ActivityRetainedComponent createComponent() {
|
||||
B0 viewModelProvider = getViewModelProvider(this.viewModelStoreOwner, this.context);
|
||||
viewModelProvider.getClass();
|
||||
Intrinsics.checkNotNullParameter(ActivityRetainedComponentViewModel.class, "modelClass");
|
||||
KClass modelClass = JvmClassMappingKt.getKotlinClass(ActivityRetainedComponentViewModel.class);
|
||||
Intrinsics.checkNotNullParameter(modelClass, "modelClass");
|
||||
Intrinsics.checkNotNullParameter(modelClass, "modelClass");
|
||||
Intrinsics.checkNotNullParameter(modelClass, "<this>");
|
||||
String qualifiedName = modelClass.getQualifiedName();
|
||||
if (qualifiedName == null) {
|
||||
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
|
||||
}
|
||||
return ((ActivityRetainedComponentViewModel) viewModelProvider.f3286a.i(modelClass, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(qualifiedName))).getComponent();
|
||||
}
|
||||
|
||||
private B0 getViewModelProvider(D0 d02, final Context context) {
|
||||
return new B0(d02, new y0() { // from class: dagger.hilt.android.internal.managers.ActivityRetainedComponentManager.1
|
||||
@Override // androidx.lifecycle.y0
|
||||
public /* bridge */ /* synthetic */ w0 create(Class cls) {
|
||||
super.create(cls);
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // androidx.lifecycle.y0
|
||||
public /* bridge */ /* synthetic */ w0 create(KClass kClass, c cVar) {
|
||||
return super.create(kClass, cVar);
|
||||
}
|
||||
|
||||
@Override // androidx.lifecycle.y0
|
||||
public <T extends w0> T create(Class<T> cls, c cVar) {
|
||||
SavedStateHandleHolder savedStateHandleHolder = new SavedStateHandleHolder(cVar);
|
||||
return new ActivityRetainedComponentViewModel(((ActivityRetainedComponentBuilderEntryPoint) EntryPointAccessors.fromApplication(context, ActivityRetainedComponentBuilderEntryPoint.class)).retainedComponentBuilder().savedStateHandleHolder(savedStateHandleHolder).build(), savedStateHandleHolder);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public SavedStateHandleHolder getSavedStateHandleHolder() {
|
||||
B0 viewModelProvider = getViewModelProvider(this.viewModelStoreOwner, this.context);
|
||||
viewModelProvider.getClass();
|
||||
Intrinsics.checkNotNullParameter(ActivityRetainedComponentViewModel.class, "modelClass");
|
||||
KClass modelClass = JvmClassMappingKt.getKotlinClass(ActivityRetainedComponentViewModel.class);
|
||||
Intrinsics.checkNotNullParameter(modelClass, "modelClass");
|
||||
Intrinsics.checkNotNullParameter(modelClass, "modelClass");
|
||||
Intrinsics.checkNotNullParameter(modelClass, "<this>");
|
||||
String qualifiedName = modelClass.getQualifiedName();
|
||||
if (qualifiedName == null) {
|
||||
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
|
||||
}
|
||||
return ((ActivityRetainedComponentViewModel) viewModelProvider.f3286a.i(modelClass, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(qualifiedName))).getSavedStateHandleHolder();
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public ActivityRetainedComponent generatedComponent() {
|
||||
if (this.component == null) {
|
||||
synchronized (this.componentLock) {
|
||||
try {
|
||||
if (this.component == null) {
|
||||
this.component = createComponent();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.hilt.android.ActivityRetainedLifecycle;
|
||||
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager;
|
||||
import dagger.internal.DaggerGenerated;
|
||||
import dagger.internal.Factory;
|
||||
import dagger.internal.Preconditions;
|
||||
import dagger.internal.QualifierMetadata;
|
||||
import dagger.internal.ScopeMetadata;
|
||||
|
||||
@ScopeMetadata("dagger.hilt.android.scopes.ActivityRetainedScoped")
|
||||
@DaggerGenerated
|
||||
@QualifierMetadata
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory implements Factory<ActivityRetainedLifecycle> {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class InstanceHolder {
|
||||
private static final ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory INSTANCE = new ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory();
|
||||
|
||||
private InstanceHolder() {
|
||||
}
|
||||
}
|
||||
|
||||
public static ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory create() {
|
||||
return InstanceHolder.INSTANCE;
|
||||
}
|
||||
|
||||
public static ActivityRetainedLifecycle provideActivityRetainedLifecycle() {
|
||||
return (ActivityRetainedLifecycle) Preconditions.checkNotNullFromProvides(ActivityRetainedComponentManager.LifecycleModule.provideActivityRetainedLifecycle());
|
||||
}
|
||||
|
||||
@Override // javax.inject.Provider
|
||||
public ActivityRetainedLifecycle get() {
|
||||
return provideActivityRetainedLifecycle();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ApplicationComponentManager implements GeneratedComponentManager<Object> {
|
||||
private volatile Object component;
|
||||
private final ComponentSupplier componentCreator;
|
||||
private final Object componentLock = new Object();
|
||||
|
||||
public ApplicationComponentManager(ComponentSupplier componentSupplier) {
|
||||
this.componentCreator = componentSupplier;
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public Object generatedComponent() {
|
||||
if (this.component == null) {
|
||||
synchronized (this.componentLock) {
|
||||
try {
|
||||
if (this.component == null) {
|
||||
this.component = this.componentCreator.get();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.Context;
|
||||
import dagger.hilt.android.internal.Contexts;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BroadcastReceiverComponentManager {
|
||||
private BroadcastReceiverComponentManager() {
|
||||
}
|
||||
|
||||
public static Object generatedComponent(Context context) {
|
||||
ComponentCallbacks2 application = Contexts.getApplication(context.getApplicationContext());
|
||||
Preconditions.checkArgument(application instanceof GeneratedComponentManager, "Hilt BroadcastReceiver must be attached to an @HiltAndroidApp Application. Found: %s", application.getClass());
|
||||
return ((GeneratedComponentManager) application).generatedComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ComponentSupplier {
|
||||
Object get();
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import androidx.fragment.app.K;
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.EntryPoints;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityComponent;
|
||||
import dagger.hilt.android.internal.builders.FragmentComponentBuilder;
|
||||
import dagger.hilt.android.internal.managers.ViewComponentManager;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class FragmentComponentManager implements GeneratedComponentManager<Object> {
|
||||
private volatile Object component;
|
||||
private final Object componentLock = new Object();
|
||||
private final K fragment;
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({ActivityComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FragmentComponentBuilderEntryPoint {
|
||||
FragmentComponentBuilder fragmentComponentBuilder();
|
||||
}
|
||||
|
||||
public FragmentComponentManager(K k4) {
|
||||
this.fragment = k4;
|
||||
}
|
||||
|
||||
private Object createComponent() {
|
||||
Preconditions.checkNotNull(this.fragment.getHost(), "Hilt Fragments must be attached before creating the component.");
|
||||
Preconditions.checkState(this.fragment.getHost() instanceof GeneratedComponentManager, "Hilt Fragments must be attached to an @AndroidEntryPoint Activity. Found: %s", this.fragment.getHost().getClass());
|
||||
validate(this.fragment);
|
||||
return ((FragmentComponentBuilderEntryPoint) EntryPoints.get(this.fragment.getHost(), FragmentComponentBuilderEntryPoint.class)).fragmentComponentBuilder().fragment(this.fragment).build();
|
||||
}
|
||||
|
||||
public static ContextWrapper createContextWrapper(Context context, K k4) {
|
||||
return new ViewComponentManager.FragmentContextWrapper(context, k4);
|
||||
}
|
||||
|
||||
public static final Context findActivity(Context context) {
|
||||
while ((context instanceof ContextWrapper) && !(context instanceof Activity)) {
|
||||
context = ((ContextWrapper) context).getBaseContext();
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
public static final void initializeArguments(K k4) {
|
||||
Preconditions.checkNotNull(k4);
|
||||
if (k4.getArguments() == null) {
|
||||
k4.setArguments(new Bundle());
|
||||
}
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public Object generatedComponent() {
|
||||
if (this.component == null) {
|
||||
synchronized (this.componentLock) {
|
||||
try {
|
||||
if (this.component == null) {
|
||||
this.component = createComponent();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
|
||||
public void validate(K k4) {
|
||||
}
|
||||
|
||||
public static ContextWrapper createContextWrapper(LayoutInflater layoutInflater, K k4) {
|
||||
return new ViewComponentManager.FragmentContextWrapper(layoutInflater, k4);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
|
||||
@EntryPoint
|
||||
@OriginatingElement(topLevelClass = ActivityRetainedComponentManager.class)
|
||||
@InstallIn({SingletonComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HiltWrapper_ActivityRetainedComponentManager_ActivityRetainedComponentBuilderEntryPoint extends ActivityRetainedComponentManager.ActivityRetainedComponentBuilderEntryPoint {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
|
||||
@EntryPoint
|
||||
@OriginatingElement(topLevelClass = ActivityRetainedComponentManager.class)
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HiltWrapper_ActivityRetainedComponentManager_ActivityRetainedLifecycleEntryPoint extends ActivityRetainedComponentManager.ActivityRetainedLifecycleEntryPoint {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
|
||||
@OriginatingElement(topLevelClass = ActivityRetainedComponentManager.class)
|
||||
@Module(includes = {ActivityRetainedComponentManager.LifecycleModule.class})
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class HiltWrapper_ActivityRetainedComponentManager_LifecycleModule {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.codegen.OriginatingElement;
|
||||
|
||||
@OriginatingElement(topLevelClass = SavedStateHandleModule.class)
|
||||
@Module(includes = {SavedStateHandleModule.class})
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class HiltWrapper_SavedStateHandleModule {
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.lifecycle.n0;
|
||||
import androidx.lifecycle.q0;
|
||||
import dagger.hilt.android.internal.ThreadUtil;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
import l0.c;
|
||||
import l0.d;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SavedStateHandleHolder {
|
||||
private c extras;
|
||||
private n0 handle;
|
||||
private final boolean nonComponentActivity;
|
||||
|
||||
public SavedStateHandleHolder(c cVar) {
|
||||
this.nonComponentActivity = cVar == null;
|
||||
this.extras = cVar;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
this.extras = null;
|
||||
}
|
||||
|
||||
public n0 getSavedStateHandle() {
|
||||
ThreadUtil.ensureMainThread();
|
||||
Preconditions.checkState(!this.nonComponentActivity, "Activity that does not extend ComponentActivity cannot use SavedStateHandle", new Object[0]);
|
||||
n0 n0Var = this.handle;
|
||||
if (n0Var != null) {
|
||||
return n0Var;
|
||||
}
|
||||
Preconditions.checkNotNull(this.extras, "The first access to SavedStateHandle should happen between super.onCreate() and super.onDestroy()");
|
||||
d dVar = new d(this.extras);
|
||||
dVar.b(q0.f3419c, Bundle.EMPTY);
|
||||
this.extras = dVar;
|
||||
n0 e4 = q0.e(dVar);
|
||||
this.handle = e4;
|
||||
this.extras = null;
|
||||
return e4;
|
||||
}
|
||||
|
||||
public boolean isInvalid() {
|
||||
return this.handle == null && this.extras == null;
|
||||
}
|
||||
|
||||
public void setExtras(c cVar) {
|
||||
if (this.handle != null) {
|
||||
return;
|
||||
}
|
||||
this.extras = cVar;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import androidx.lifecycle.n0;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityRetainedComponent;
|
||||
import dagger.hilt.android.lifecycle.ActivityRetainedSavedState;
|
||||
import dagger.hilt.android.scopes.ActivityRetainedScoped;
|
||||
|
||||
@Module
|
||||
@InstallIn({ActivityRetainedComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
abstract class SavedStateHandleModule {
|
||||
@Provides
|
||||
@ActivityRetainedScoped
|
||||
@ActivityRetainedSavedState
|
||||
public static n0 provideSavedStateHandle(SavedStateHandleHolder savedStateHandleHolder) {
|
||||
return savedStateHandleHolder.getSavedStateHandle();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import androidx.lifecycle.n0;
|
||||
import dagger.internal.DaggerGenerated;
|
||||
import dagger.internal.Factory;
|
||||
import dagger.internal.Preconditions;
|
||||
import dagger.internal.QualifierMetadata;
|
||||
import dagger.internal.ScopeMetadata;
|
||||
import javax.inject.Provider;
|
||||
|
||||
@ScopeMetadata("dagger.hilt.android.scopes.ActivityRetainedScoped")
|
||||
@DaggerGenerated
|
||||
@QualifierMetadata({"dagger.hilt.android.lifecycle.ActivityRetainedSavedState"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SavedStateHandleModule_ProvideSavedStateHandleFactory implements Factory<n0> {
|
||||
private final Provider<SavedStateHandleHolder> savedStateHandleHolderProvider;
|
||||
|
||||
public SavedStateHandleModule_ProvideSavedStateHandleFactory(Provider<SavedStateHandleHolder> provider) {
|
||||
this.savedStateHandleHolderProvider = provider;
|
||||
}
|
||||
|
||||
public static SavedStateHandleModule_ProvideSavedStateHandleFactory create(Provider<SavedStateHandleHolder> provider) {
|
||||
return new SavedStateHandleModule_ProvideSavedStateHandleFactory(provider);
|
||||
}
|
||||
|
||||
public static n0 provideSavedStateHandle(SavedStateHandleHolder savedStateHandleHolder) {
|
||||
return (n0) Preconditions.checkNotNullFromProvides(SavedStateHandleModule.provideSavedStateHandle(savedStateHandleHolder));
|
||||
}
|
||||
|
||||
@Override // javax.inject.Provider
|
||||
public n0 get() {
|
||||
return provideSavedStateHandle(this.savedStateHandleHolderProvider.get());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.app.Application;
|
||||
import android.app.Service;
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.EntryPoints;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.internal.builders.ServiceComponentBuilder;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ServiceComponentManager implements GeneratedComponentManager<Object> {
|
||||
private Object component;
|
||||
private final Service service;
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({SingletonComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ServiceComponentBuilderEntryPoint {
|
||||
ServiceComponentBuilder serviceComponentBuilder();
|
||||
}
|
||||
|
||||
public ServiceComponentManager(Service service) {
|
||||
this.service = service;
|
||||
}
|
||||
|
||||
private Object createComponent() {
|
||||
Application application = this.service.getApplication();
|
||||
Preconditions.checkState(application instanceof GeneratedComponentManager, "Hilt service must be attached to an @HiltAndroidApp Application. Found: %s", application.getClass());
|
||||
return ((ServiceComponentBuilderEntryPoint) EntryPoints.get(application, ServiceComponentBuilderEntryPoint.class)).serviceComponentBuilder().service(this.service).build();
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public Object generatedComponent() {
|
||||
if (this.component == null) {
|
||||
this.component = createComponent();
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package dagger.hilt.android.internal.managers;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import androidx.fragment.app.K;
|
||||
import androidx.lifecycle.A;
|
||||
import androidx.lifecycle.H;
|
||||
import androidx.lifecycle.J;
|
||||
import dagger.hilt.EntryPoint;
|
||||
import dagger.hilt.EntryPoints;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.android.components.ActivityComponent;
|
||||
import dagger.hilt.android.components.FragmentComponent;
|
||||
import dagger.hilt.android.internal.Contexts;
|
||||
import dagger.hilt.android.internal.builders.ViewComponentBuilder;
|
||||
import dagger.hilt.android.internal.builders.ViewWithFragmentComponentBuilder;
|
||||
import dagger.hilt.internal.GeneratedComponentManager;
|
||||
import dagger.hilt.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ViewComponentManager implements GeneratedComponentManager<Object> {
|
||||
private volatile Object component;
|
||||
private final Object componentLock = new Object();
|
||||
private final boolean hasFragmentBindings;
|
||||
private final View view;
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({ActivityComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ViewComponentBuilderEntryPoint {
|
||||
ViewComponentBuilder viewComponentBuilder();
|
||||
}
|
||||
|
||||
@EntryPoint
|
||||
@InstallIn({FragmentComponent.class})
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ViewWithFragmentComponentBuilderEntryPoint {
|
||||
ViewWithFragmentComponentBuilder viewWithFragmentComponentBuilder();
|
||||
}
|
||||
|
||||
public ViewComponentManager(View view, boolean z3) {
|
||||
this.view = view;
|
||||
this.hasFragmentBindings = z3;
|
||||
}
|
||||
|
||||
private Object createComponent() {
|
||||
GeneratedComponentManager<?> parentComponentManager = getParentComponentManager(false);
|
||||
return this.hasFragmentBindings ? ((ViewWithFragmentComponentBuilderEntryPoint) EntryPoints.get(parentComponentManager, ViewWithFragmentComponentBuilderEntryPoint.class)).viewWithFragmentComponentBuilder().view(this.view).build() : ((ViewComponentBuilderEntryPoint) EntryPoints.get(parentComponentManager, ViewComponentBuilderEntryPoint.class)).viewComponentBuilder().view(this.view).build();
|
||||
}
|
||||
|
||||
private GeneratedComponentManager<?> getParentComponentManager(boolean z3) {
|
||||
if (this.hasFragmentBindings) {
|
||||
Context parentContext = getParentContext(FragmentContextWrapper.class, z3);
|
||||
if (parentContext instanceof FragmentContextWrapper) {
|
||||
return (GeneratedComponentManager) ((FragmentContextWrapper) parentContext).getFragment();
|
||||
}
|
||||
if (z3) {
|
||||
return null;
|
||||
}
|
||||
Preconditions.checkState(!(r5 instanceof GeneratedComponentManager), "%s, @WithFragmentBindings Hilt view must be attached to an @AndroidEntryPoint Fragment. Was attached to context %s", this.view.getClass(), getParentContext(GeneratedComponentManager.class, z3).getClass().getName());
|
||||
} else {
|
||||
Object parentContext2 = getParentContext(GeneratedComponentManager.class, z3);
|
||||
if (parentContext2 instanceof GeneratedComponentManager) {
|
||||
return (GeneratedComponentManager) parentContext2;
|
||||
}
|
||||
if (z3) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
throw new IllegalStateException(this.view.getClass() + ", Hilt view must be attached to an @AndroidEntryPoint Fragment or Activity.");
|
||||
}
|
||||
|
||||
private Context getParentContext(Class<?> cls, boolean z3) {
|
||||
Context unwrap = unwrap(this.view.getContext(), cls);
|
||||
if (unwrap != Contexts.getApplication(unwrap.getApplicationContext())) {
|
||||
return unwrap;
|
||||
}
|
||||
Preconditions.checkState(z3, "%s, Hilt view cannot be created using the application context. Use a Hilt Fragment or Activity context.", this.view.getClass());
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Context unwrap(Context context, Class<?> cls) {
|
||||
while ((context instanceof ContextWrapper) && !cls.isInstance(context)) {
|
||||
context = ((ContextWrapper) context).getBaseContext();
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@Override // dagger.hilt.internal.GeneratedComponentManager
|
||||
public Object generatedComponent() {
|
||||
if (this.component == null) {
|
||||
synchronized (this.componentLock) {
|
||||
try {
|
||||
if (this.component == null) {
|
||||
this.component = createComponent();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.component;
|
||||
}
|
||||
|
||||
public GeneratedComponentManager<?> maybeGetParentComponentManager() {
|
||||
return getParentComponentManager(true);
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class FragmentContextWrapper extends ContextWrapper {
|
||||
private LayoutInflater baseInflater;
|
||||
private K fragment;
|
||||
private final H fragmentLifecycleObserver;
|
||||
private LayoutInflater inflater;
|
||||
|
||||
public FragmentContextWrapper(Context context, K k4) {
|
||||
super((Context) Preconditions.checkNotNull(context));
|
||||
H h = new H() { // from class: dagger.hilt.android.internal.managers.ViewComponentManager.FragmentContextWrapper.1
|
||||
@Override // androidx.lifecycle.H
|
||||
public void onStateChanged(J j4, A a2) {
|
||||
if (a2 == A.ON_DESTROY) {
|
||||
FragmentContextWrapper.this.fragment = null;
|
||||
FragmentContextWrapper.this.baseInflater = null;
|
||||
FragmentContextWrapper.this.inflater = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.fragmentLifecycleObserver = h;
|
||||
this.baseInflater = null;
|
||||
K k5 = (K) Preconditions.checkNotNull(k4);
|
||||
this.fragment = k5;
|
||||
k5.getLifecycle().a(h);
|
||||
}
|
||||
|
||||
public K getFragment() {
|
||||
Preconditions.checkNotNull(this.fragment, "The fragment has already been destroyed.");
|
||||
return this.fragment;
|
||||
}
|
||||
|
||||
@Override // android.content.ContextWrapper, android.content.Context
|
||||
public Object getSystemService(String str) {
|
||||
if (!"layout_inflater".equals(str)) {
|
||||
return getBaseContext().getSystemService(str);
|
||||
}
|
||||
if (this.inflater == null) {
|
||||
if (this.baseInflater == null) {
|
||||
this.baseInflater = (LayoutInflater) getBaseContext().getSystemService("layout_inflater");
|
||||
}
|
||||
this.inflater = this.baseInflater.cloneInContext(this);
|
||||
}
|
||||
return this.inflater;
|
||||
}
|
||||
|
||||
public FragmentContextWrapper(LayoutInflater layoutInflater, K k4) {
|
||||
super((Context) Preconditions.checkNotNull(((LayoutInflater) Preconditions.checkNotNull(layoutInflater)).getContext()));
|
||||
H h = new H() { // from class: dagger.hilt.android.internal.managers.ViewComponentManager.FragmentContextWrapper.1
|
||||
@Override // androidx.lifecycle.H
|
||||
public void onStateChanged(J j4, A a2) {
|
||||
if (a2 == A.ON_DESTROY) {
|
||||
FragmentContextWrapper.this.fragment = null;
|
||||
FragmentContextWrapper.this.baseInflater = null;
|
||||
FragmentContextWrapper.this.inflater = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.fragmentLifecycleObserver = h;
|
||||
this.baseInflater = layoutInflater;
|
||||
K k5 = (K) Preconditions.checkNotNull(k4);
|
||||
this.fragment = k5;
|
||||
k5.getLifecycle().a(h);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user