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,9 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuildConfig {
|
||||
public static final String BUILD_TYPE = "release";
|
||||
public static final boolean DEBUG = false;
|
||||
public static final String LIBRARY_PACKAGE_NAME = "com.google.firebase.components";
|
||||
public static final String VERSION_NAME = "17.1.5";
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Component<T> {
|
||||
private final Set<Dependency> dependencies;
|
||||
private final ComponentFactory<T> factory;
|
||||
private final int instantiation;
|
||||
private final String name;
|
||||
private final Set<Qualified<? super T>> providedInterfaces;
|
||||
private final Set<Class<?>> publishedEvents;
|
||||
private final int type;
|
||||
|
||||
public static <T> Builder<T> builder(Class<T> cls) {
|
||||
return new Builder<>(cls, new Class[0]);
|
||||
}
|
||||
|
||||
public static <T> Component<T> intoSet(T t2, Class<T> cls) {
|
||||
return intoSetBuilder(cls).factory(new a(t2, 2)).build();
|
||||
}
|
||||
|
||||
public static <T> Builder<T> intoSetBuilder(Class<T> cls) {
|
||||
return builder(cls).intoSet();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ Object lambda$intoSet$3(Object obj, ComponentContainer componentContainer) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ Object lambda$intoSet$4(Object obj, ComponentContainer componentContainer) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ Object lambda$of$0(Object obj, ComponentContainer componentContainer) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ Object lambda$of$1(Object obj, ComponentContainer componentContainer) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ Object lambda$of$2(Object obj, ComponentContainer componentContainer) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static <T> Component<T> of(Class<T> cls, T t2) {
|
||||
return builder(cls).factory(new a(t2, 3)).build();
|
||||
}
|
||||
|
||||
public Set<Dependency> getDependencies() {
|
||||
return this.dependencies;
|
||||
}
|
||||
|
||||
public ComponentFactory<T> getFactory() {
|
||||
return this.factory;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public Set<Qualified<? super T>> getProvidedInterfaces() {
|
||||
return this.providedInterfaces;
|
||||
}
|
||||
|
||||
public Set<Class<?>> getPublishedEvents() {
|
||||
return this.publishedEvents;
|
||||
}
|
||||
|
||||
public boolean isAlwaysEager() {
|
||||
return this.instantiation == 1;
|
||||
}
|
||||
|
||||
public boolean isEagerInDefaultApp() {
|
||||
return this.instantiation == 2;
|
||||
}
|
||||
|
||||
public boolean isLazy() {
|
||||
return this.instantiation == 0;
|
||||
}
|
||||
|
||||
public boolean isValue() {
|
||||
return this.type == 0;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Component<" + Arrays.toString(this.providedInterfaces.toArray()) + ">{" + this.instantiation + ", type=" + this.type + ", deps=" + Arrays.toString(this.dependencies.toArray()) + "}";
|
||||
}
|
||||
|
||||
public Component<T> withFactory(ComponentFactory<T> componentFactory) {
|
||||
return new Component<>(this.name, this.providedInterfaces, this.dependencies, this.instantiation, this.type, componentFactory, this.publishedEvents);
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder<T> {
|
||||
private final Set<Dependency> dependencies;
|
||||
private ComponentFactory<T> factory;
|
||||
private int instantiation;
|
||||
private String name;
|
||||
private final Set<Qualified<? super T>> providedInterfaces;
|
||||
private final Set<Class<?>> publishedEvents;
|
||||
private int type;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public Builder<T> intoSet() {
|
||||
this.type = 1;
|
||||
return this;
|
||||
}
|
||||
|
||||
private Builder<T> setInstantiation(int i) {
|
||||
Preconditions.checkState(this.instantiation == 0, "Instantiation type has already been set.");
|
||||
this.instantiation = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
private void validateInterface(Qualified<?> qualified) {
|
||||
Preconditions.checkArgument(!this.providedInterfaces.contains(qualified), "Components are not allowed to depend on interfaces they themselves provide.");
|
||||
}
|
||||
|
||||
public Builder<T> add(Dependency dependency) {
|
||||
Preconditions.checkNotNull(dependency, "Null dependency");
|
||||
validateInterface(dependency.getInterface());
|
||||
this.dependencies.add(dependency);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> alwaysEager() {
|
||||
return setInstantiation(1);
|
||||
}
|
||||
|
||||
public Component<T> build() {
|
||||
Preconditions.checkState(this.factory != null, "Missing required property: factory.");
|
||||
return new Component<>(this.name, new HashSet(this.providedInterfaces), new HashSet(this.dependencies), this.instantiation, this.type, this.factory, this.publishedEvents);
|
||||
}
|
||||
|
||||
public Builder<T> eagerInDefaultApp() {
|
||||
return setInstantiation(2);
|
||||
}
|
||||
|
||||
public Builder<T> factory(ComponentFactory<T> componentFactory) {
|
||||
this.factory = (ComponentFactory) Preconditions.checkNotNull(componentFactory, "Null factory");
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> name(String str) {
|
||||
this.name = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> publishes(Class<?> cls) {
|
||||
this.publishedEvents.add(cls);
|
||||
return this;
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
private Builder(Class<T> cls, Class<? super T>... clsArr) {
|
||||
this.name = null;
|
||||
HashSet hashSet = new HashSet();
|
||||
this.providedInterfaces = hashSet;
|
||||
this.dependencies = new HashSet();
|
||||
this.instantiation = 0;
|
||||
this.type = 0;
|
||||
this.publishedEvents = new HashSet();
|
||||
Preconditions.checkNotNull(cls, "Null interface");
|
||||
hashSet.add(Qualified.unqualified(cls));
|
||||
for (Class<? super T> cls2 : clsArr) {
|
||||
Preconditions.checkNotNull(cls2, "Null interface");
|
||||
this.providedInterfaces.add(Qualified.unqualified(cls2));
|
||||
}
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
private Builder(Qualified<T> qualified, Qualified<? super T>... qualifiedArr) {
|
||||
this.name = null;
|
||||
HashSet hashSet = new HashSet();
|
||||
this.providedInterfaces = hashSet;
|
||||
this.dependencies = new HashSet();
|
||||
this.instantiation = 0;
|
||||
this.type = 0;
|
||||
this.publishedEvents = new HashSet();
|
||||
Preconditions.checkNotNull(qualified, "Null interface");
|
||||
hashSet.add(qualified);
|
||||
for (Qualified<? super T> qualified2 : qualifiedArr) {
|
||||
Preconditions.checkNotNull(qualified2, "Null interface");
|
||||
}
|
||||
Collections.addAll(this.providedInterfaces, qualifiedArr);
|
||||
}
|
||||
}
|
||||
|
||||
private Component(String str, Set<Qualified<? super T>> set, Set<Dependency> set2, int i, int i4, ComponentFactory<T> componentFactory, Set<Class<?>> set3) {
|
||||
this.name = str;
|
||||
this.providedInterfaces = Collections.unmodifiableSet(set);
|
||||
this.dependencies = Collections.unmodifiableSet(set2);
|
||||
this.instantiation = i;
|
||||
this.type = i4;
|
||||
this.factory = componentFactory;
|
||||
this.publishedEvents = Collections.unmodifiableSet(set3);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> Builder<T> builder(Class<T> cls, Class<? super T>... clsArr) {
|
||||
return new Builder<>(cls, clsArr);
|
||||
}
|
||||
|
||||
public static <T> Component<T> intoSet(T t2, Qualified<T> qualified) {
|
||||
return intoSetBuilder(qualified).factory(new a(t2, 1)).build();
|
||||
}
|
||||
|
||||
public static <T> Builder<T> intoSetBuilder(Qualified<T> qualified) {
|
||||
return builder(qualified).intoSet();
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> Component<T> of(T t2, Class<T> cls, Class<? super T>... clsArr) {
|
||||
return builder(cls, clsArr).factory(new a(t2, 4)).build();
|
||||
}
|
||||
|
||||
public static <T> Builder<T> builder(Qualified<T> qualified) {
|
||||
return new Builder<>(qualified, new Qualified[0]);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> Component<T> of(T t2, Qualified<T> qualified, Qualified<? super T>... qualifiedArr) {
|
||||
return builder(qualified, qualifiedArr).factory(new a(t2, 0)).build();
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> Builder<T> builder(Qualified<T> qualified, Qualified<? super T>... qualifiedArr) {
|
||||
return new Builder<>(qualified, qualifiedArr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Deferred;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ComponentContainer {
|
||||
default <T> T get(Class<T> cls) {
|
||||
return (T) get(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
<T> Deferred<T> getDeferred(Qualified<T> qualified);
|
||||
|
||||
default <T> Deferred<T> getDeferred(Class<T> cls) {
|
||||
return getDeferred(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
<T> Provider<T> getProvider(Qualified<T> qualified);
|
||||
|
||||
default <T> Provider<T> getProvider(Class<T> cls) {
|
||||
return getProvider(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
default <T> Set<T> setOf(Class<T> cls) {
|
||||
return setOf(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
<T> Provider<Set<T>> setOfProvider(Qualified<T> qualified);
|
||||
|
||||
default <T> Provider<Set<T>> setOfProvider(Class<T> cls) {
|
||||
return setOfProvider(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
default <T> T get(Qualified<T> qualified) {
|
||||
Provider<T> provider = getProvider(qualified);
|
||||
if (provider == null) {
|
||||
return null;
|
||||
}
|
||||
return provider.get();
|
||||
}
|
||||
|
||||
default <T> Set<T> setOf(Qualified<T> qualified) {
|
||||
return setOfProvider(qualified).get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import C.w;
|
||||
import android.app.Service;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ComponentDiscovery<T> {
|
||||
private static final String COMPONENT_KEY_PREFIX = "com.google.firebase.components:";
|
||||
private static final String COMPONENT_SENTINEL_VALUE = "com.google.firebase.components.ComponentRegistrar";
|
||||
static final String TAG = "ComponentDiscovery";
|
||||
private final T context;
|
||||
private final RegistrarNameRetriever<T> retriever;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class MetadataRegistrarNameRetriever implements RegistrarNameRetriever<Context> {
|
||||
private final Class<? extends Service> discoveryService;
|
||||
|
||||
private Bundle getMetadata(Context context) {
|
||||
try {
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
if (packageManager == null) {
|
||||
Log.w(ComponentDiscovery.TAG, "Context has no PackageManager.");
|
||||
return null;
|
||||
}
|
||||
ServiceInfo serviceInfo = packageManager.getServiceInfo(new ComponentName(context, this.discoveryService), 128);
|
||||
if (serviceInfo != null) {
|
||||
return serviceInfo.metaData;
|
||||
}
|
||||
Log.w(ComponentDiscovery.TAG, this.discoveryService + " has no service info.");
|
||||
return null;
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
Log.w(ComponentDiscovery.TAG, "Application info not found.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private MetadataRegistrarNameRetriever(Class<? extends Service> cls) {
|
||||
this.discoveryService = cls;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentDiscovery.RegistrarNameRetriever
|
||||
public List<String> retrieve(Context context) {
|
||||
Bundle metadata = getMetadata(context);
|
||||
if (metadata == null) {
|
||||
Log.w(ComponentDiscovery.TAG, "Could not retrieve metadata, returning empty list of registrars.");
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (String str : metadata.keySet()) {
|
||||
if (ComponentDiscovery.COMPONENT_SENTINEL_VALUE.equals(metadata.get(str)) && str.startsWith(ComponentDiscovery.COMPONENT_KEY_PREFIX)) {
|
||||
arrayList.add(str.substring(31));
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface RegistrarNameRetriever<T> {
|
||||
List<String> retrieve(T t2);
|
||||
}
|
||||
|
||||
public ComponentDiscovery(T t2, RegistrarNameRetriever<T> registrarNameRetriever) {
|
||||
this.context = t2;
|
||||
this.retriever = registrarNameRetriever;
|
||||
}
|
||||
|
||||
public static ComponentDiscovery<Context> forContext(Context context, Class<? extends Service> cls) {
|
||||
return new ComponentDiscovery<>(context, new MetadataRegistrarNameRetriever(cls));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static ComponentRegistrar instantiate(String str) {
|
||||
try {
|
||||
Class<?> cls = Class.forName(str);
|
||||
if (ComponentRegistrar.class.isAssignableFrom(cls)) {
|
||||
return (ComponentRegistrar) cls.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
|
||||
}
|
||||
throw new InvalidRegistrarException("Class " + str + " is not an instance of com.google.firebase.components.ComponentRegistrar");
|
||||
} catch (ClassNotFoundException unused) {
|
||||
Log.w(TAG, "Class " + str + " is not an found.");
|
||||
return null;
|
||||
} catch (IllegalAccessException e4) {
|
||||
throw new InvalidRegistrarException(w.o("Could not instantiate ", str, "."), e4);
|
||||
} catch (InstantiationException e5) {
|
||||
throw new InvalidRegistrarException(w.o("Could not instantiate ", str, "."), e5);
|
||||
} catch (NoSuchMethodException e6) {
|
||||
throw new InvalidRegistrarException(w.z("Could not instantiate ", str), e6);
|
||||
} catch (InvocationTargetException e7) {
|
||||
throw new InvalidRegistrarException(w.z("Could not instantiate ", str), e7);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<ComponentRegistrar> discover() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<String> it = this.retriever.retrieve(this.context).iterator();
|
||||
while (it.hasNext()) {
|
||||
try {
|
||||
ComponentRegistrar instantiate = instantiate(it.next());
|
||||
if (instantiate != null) {
|
||||
arrayList.add(instantiate);
|
||||
}
|
||||
} catch (InvalidRegistrarException e4) {
|
||||
Log.w(TAG, "Invalid component registrar.", e4);
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public List<Provider<ComponentRegistrar>> discoverLazy() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<String> it = this.retriever.retrieve(this.context).iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(new b(it.next(), 0));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ComponentDiscoveryService extends Service {
|
||||
@Override // android.app.Service
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ComponentFactory<T> {
|
||||
T create(ComponentContainer componentContainer);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ComponentRegistrar {
|
||||
List<Component<?>> getComponents();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ComponentRegistrarProcessor {
|
||||
public static final ComponentRegistrarProcessor NOOP = new Object();
|
||||
|
||||
List<Component<?>> processRegistrar(ComponentRegistrar componentRegistrar);
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.firebase.dynamicloading.ComponentLoader;
|
||||
import com.google.firebase.events.Publisher;
|
||||
import com.google.firebase.events.Subscriber;
|
||||
import com.google.firebase.inject.Deferred;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ComponentRuntime implements ComponentContainer, ComponentLoader {
|
||||
private static final Provider<Set<Object>> EMPTY_PROVIDER = new g(1);
|
||||
private final ComponentRegistrarProcessor componentRegistrarProcessor;
|
||||
private final Map<Component<?>, Provider<?>> components;
|
||||
private final AtomicReference<Boolean> eagerComponentsInitializedWith;
|
||||
private final EventBus eventBus;
|
||||
private final Map<Qualified<?>, Provider<?>> lazyInstanceMap;
|
||||
private final Map<Qualified<?>, LazySet<?>> lazySetMap;
|
||||
private Set<String> processedCoroutineDispatcherInterfaces;
|
||||
private final List<Provider<ComponentRegistrar>> unprocessedRegistrarProviders;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder {
|
||||
private final Executor defaultExecutor;
|
||||
private final List<Provider<ComponentRegistrar>> lazyRegistrars = new ArrayList();
|
||||
private final List<Component<?>> additionalComponents = new ArrayList();
|
||||
private ComponentRegistrarProcessor componentRegistrarProcessor = ComponentRegistrarProcessor.NOOP;
|
||||
|
||||
public Builder(Executor executor) {
|
||||
this.defaultExecutor = executor;
|
||||
}
|
||||
|
||||
public static /* synthetic */ ComponentRegistrar lambda$addComponentRegistrar$0(ComponentRegistrar componentRegistrar) {
|
||||
return componentRegistrar;
|
||||
}
|
||||
|
||||
public Builder addComponent(Component<?> component) {
|
||||
this.additionalComponents.add(component);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addComponentRegistrar(ComponentRegistrar componentRegistrar) {
|
||||
this.lazyRegistrars.add(new c(componentRegistrar, 1));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addLazyComponentRegistrars(Collection<Provider<ComponentRegistrar>> collection) {
|
||||
this.lazyRegistrars.addAll(collection);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ComponentRuntime build() {
|
||||
return new ComponentRuntime(this.defaultExecutor, this.lazyRegistrars, this.additionalComponents, this.componentRegistrarProcessor);
|
||||
}
|
||||
|
||||
public Builder setProcessor(ComponentRegistrarProcessor componentRegistrarProcessor) {
|
||||
this.componentRegistrarProcessor = componentRegistrarProcessor;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ ComponentRuntime(Executor executor, Iterable iterable, Collection collection, ComponentRegistrarProcessor componentRegistrarProcessor, AnonymousClass1 anonymousClass1) {
|
||||
this(executor, iterable, collection, componentRegistrarProcessor);
|
||||
}
|
||||
|
||||
public static Builder builder(Executor executor) {
|
||||
return new Builder(executor);
|
||||
}
|
||||
|
||||
private void discoverComponents(List<Component<?>> list) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
synchronized (this) {
|
||||
Iterator<Provider<ComponentRegistrar>> it = this.unprocessedRegistrarProviders.iterator();
|
||||
while (it.hasNext()) {
|
||||
try {
|
||||
ComponentRegistrar componentRegistrar = it.next().get();
|
||||
if (componentRegistrar != null) {
|
||||
list.addAll(this.componentRegistrarProcessor.processRegistrar(componentRegistrar));
|
||||
it.remove();
|
||||
}
|
||||
} catch (InvalidRegistrarException e4) {
|
||||
it.remove();
|
||||
Log.w("ComponentDiscovery", "Invalid component registrar.", e4);
|
||||
}
|
||||
}
|
||||
Iterator<Component<?>> it2 = list.iterator();
|
||||
while (it2.hasNext()) {
|
||||
Object[] array = it2.next().getProvidedInterfaces().toArray();
|
||||
int length = array.length;
|
||||
int i = 0;
|
||||
while (true) {
|
||||
if (i < length) {
|
||||
Object obj = array[i];
|
||||
if (obj.toString().contains("kotlinx.coroutines.CoroutineDispatcher")) {
|
||||
if (this.processedCoroutineDispatcherInterfaces.contains(obj.toString())) {
|
||||
it2.remove();
|
||||
break;
|
||||
}
|
||||
this.processedCoroutineDispatcherInterfaces.add(obj.toString());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.components.isEmpty()) {
|
||||
CycleDetector.detect(list);
|
||||
} else {
|
||||
ArrayList arrayList2 = new ArrayList(this.components.keySet());
|
||||
arrayList2.addAll(list);
|
||||
CycleDetector.detect(arrayList2);
|
||||
}
|
||||
for (final Component<?> component : list) {
|
||||
this.components.put(component, new Lazy(new Provider() { // from class: com.google.firebase.components.d
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public final Object get() {
|
||||
Object lambda$discoverComponents$0;
|
||||
lambda$discoverComponents$0 = ComponentRuntime.this.lambda$discoverComponents$0(component);
|
||||
return lambda$discoverComponents$0;
|
||||
}
|
||||
}));
|
||||
}
|
||||
arrayList.addAll(processInstanceComponents(list));
|
||||
arrayList.addAll(processSetComponents());
|
||||
processDependencies();
|
||||
}
|
||||
Iterator it3 = arrayList.iterator();
|
||||
while (it3.hasNext()) {
|
||||
((Runnable) it3.next()).run();
|
||||
}
|
||||
maybeInitializeEagerComponents();
|
||||
}
|
||||
|
||||
private void doInitializeEagerComponents(Map<Component<?>, Provider<?>> map, boolean z3) {
|
||||
for (Map.Entry<Component<?>, Provider<?>> entry : map.entrySet()) {
|
||||
Component<?> key = entry.getKey();
|
||||
Provider<?> value = entry.getValue();
|
||||
if (key.isAlwaysEager() || (key.isEagerInDefaultApp() && z3)) {
|
||||
value.get();
|
||||
}
|
||||
}
|
||||
this.eventBus.enablePublishingAndFlushPending();
|
||||
}
|
||||
|
||||
private static <T> List<T> iterableToList(Iterable<T> iterable) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<T> it = iterable.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(it.next());
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public /* synthetic */ Object lambda$discoverComponents$0(Component component) {
|
||||
return component.getFactory().create(new RestrictedComponentContainer(component, this));
|
||||
}
|
||||
|
||||
public static /* synthetic */ ComponentRegistrar lambda$toProviders$1(ComponentRegistrar componentRegistrar) {
|
||||
return componentRegistrar;
|
||||
}
|
||||
|
||||
private void maybeInitializeEagerComponents() {
|
||||
Boolean bool = this.eagerComponentsInitializedWith.get();
|
||||
if (bool != null) {
|
||||
doInitializeEagerComponents(this.components, bool.booleanValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void processDependencies() {
|
||||
for (Component<?> component : this.components.keySet()) {
|
||||
for (Dependency dependency : component.getDependencies()) {
|
||||
if (dependency.isSet() && !this.lazySetMap.containsKey(dependency.getInterface())) {
|
||||
this.lazySetMap.put(dependency.getInterface(), LazySet.fromCollection(Collections.EMPTY_SET));
|
||||
} else if (this.lazyInstanceMap.containsKey(dependency.getInterface())) {
|
||||
continue;
|
||||
} else {
|
||||
if (dependency.isRequired()) {
|
||||
throw new MissingDependencyException("Unsatisfied dependency for component " + component + ": " + dependency.getInterface());
|
||||
}
|
||||
if (!dependency.isSet()) {
|
||||
this.lazyInstanceMap.put(dependency.getInterface(), OptionalProvider.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<Runnable> processInstanceComponents(List<Component<?>> list) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Component<?> component : list) {
|
||||
if (component.isValue()) {
|
||||
Provider<?> provider = this.components.get(component);
|
||||
for (Qualified<? super Object> qualified : component.getProvidedInterfaces()) {
|
||||
if (this.lazyInstanceMap.containsKey(qualified)) {
|
||||
arrayList.add(new e(0, (OptionalProvider) this.lazyInstanceMap.get(qualified), provider));
|
||||
} else {
|
||||
this.lazyInstanceMap.put(qualified, provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private List<Runnable> processSetComponents() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
HashMap hashMap = new HashMap();
|
||||
for (Map.Entry<Component<?>, Provider<?>> entry : this.components.entrySet()) {
|
||||
Component<?> key = entry.getKey();
|
||||
if (!key.isValue()) {
|
||||
Provider<?> value = entry.getValue();
|
||||
for (Qualified<? super Object> qualified : key.getProvidedInterfaces()) {
|
||||
if (!hashMap.containsKey(qualified)) {
|
||||
hashMap.put(qualified, new HashSet());
|
||||
}
|
||||
((Set) hashMap.get(qualified)).add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Map.Entry entry2 : hashMap.entrySet()) {
|
||||
if (this.lazySetMap.containsKey(entry2.getKey())) {
|
||||
LazySet<?> lazySet = this.lazySetMap.get(entry2.getKey());
|
||||
Iterator it = ((Set) entry2.getValue()).iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(new e(1, lazySet, (Provider) it.next()));
|
||||
}
|
||||
} else {
|
||||
this.lazySetMap.put((Qualified) entry2.getKey(), LazySet.fromCollection((Collection) entry2.getValue()));
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static Iterable<Provider<ComponentRegistrar>> toProviders(Iterable<ComponentRegistrar> iterable) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<ComponentRegistrar> it = iterable.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(new c(it.next(), 0));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public Collection<Component<?>> getAllComponentsForTest() {
|
||||
return this.components.keySet();
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Deferred<T> getDeferred(Qualified<T> qualified) {
|
||||
Provider<T> provider = getProvider(qualified);
|
||||
return provider == null ? OptionalProvider.empty() : provider instanceof OptionalProvider ? (OptionalProvider) provider : OptionalProvider.of(provider);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public synchronized <T> Provider<T> getProvider(Qualified<T> qualified) {
|
||||
Preconditions.checkNotNull(qualified, "Null interface requested.");
|
||||
return (Provider) this.lazyInstanceMap.get(qualified);
|
||||
}
|
||||
|
||||
public void initializeAllComponentsForTests() {
|
||||
Iterator<Provider<?>> it = this.components.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().get();
|
||||
}
|
||||
}
|
||||
|
||||
public void initializeEagerComponents(boolean z3) {
|
||||
HashMap hashMap;
|
||||
AtomicReference<Boolean> atomicReference = this.eagerComponentsInitializedWith;
|
||||
Boolean valueOf = Boolean.valueOf(z3);
|
||||
while (!atomicReference.compareAndSet(null, valueOf)) {
|
||||
if (atomicReference.get() != null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
hashMap = new HashMap(this.components);
|
||||
}
|
||||
doInitializeEagerComponents(hashMap, z3);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public synchronized <T> Provider<Set<T>> setOfProvider(Qualified<T> qualified) {
|
||||
LazySet<?> lazySet = this.lazySetMap.get(qualified);
|
||||
if (lazySet != null) {
|
||||
return lazySet;
|
||||
}
|
||||
return (Provider<Set<T>>) EMPTY_PROVIDER;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ComponentRuntime(Executor executor, Iterable<ComponentRegistrar> iterable, Component<?>... componentArr) {
|
||||
this(executor, toProviders(iterable), Arrays.asList(componentArr), ComponentRegistrarProcessor.NOOP);
|
||||
}
|
||||
|
||||
private ComponentRuntime(Executor executor, Iterable<Provider<ComponentRegistrar>> iterable, Collection<Component<?>> collection, ComponentRegistrarProcessor componentRegistrarProcessor) {
|
||||
this.components = new HashMap();
|
||||
this.lazyInstanceMap = new HashMap();
|
||||
this.lazySetMap = new HashMap();
|
||||
this.processedCoroutineDispatcherInterfaces = new HashSet();
|
||||
this.eagerComponentsInitializedWith = new AtomicReference<>();
|
||||
EventBus eventBus = new EventBus(executor);
|
||||
this.eventBus = eventBus;
|
||||
this.componentRegistrarProcessor = componentRegistrarProcessor;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.add(Component.of(eventBus, (Class<EventBus>) EventBus.class, (Class<? super EventBus>[]) new Class[]{Subscriber.class, Publisher.class}));
|
||||
arrayList.add(Component.of(this, (Class<ComponentRuntime>) ComponentLoader.class, (Class<? super ComponentRuntime>[]) new Class[0]));
|
||||
for (Component<?> component : collection) {
|
||||
if (component != null) {
|
||||
arrayList.add(component);
|
||||
}
|
||||
}
|
||||
this.unprocessedRegistrarProviders = iterableToList(iterable);
|
||||
discoverComponents(arrayList);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.dynamicloading.ComponentLoader
|
||||
public void discoverComponents() {
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (this.unprocessedRegistrarProviders.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
discoverComponents(new ArrayList());
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class CycleDetector {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class ComponentNode {
|
||||
private final Component<?> component;
|
||||
private final Set<ComponentNode> dependencies = new HashSet();
|
||||
private final Set<ComponentNode> dependents = new HashSet();
|
||||
|
||||
public ComponentNode(Component<?> component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public void addDependency(ComponentNode componentNode) {
|
||||
this.dependencies.add(componentNode);
|
||||
}
|
||||
|
||||
public void addDependent(ComponentNode componentNode) {
|
||||
this.dependents.add(componentNode);
|
||||
}
|
||||
|
||||
public Component<?> getComponent() {
|
||||
return this.component;
|
||||
}
|
||||
|
||||
public Set<ComponentNode> getDependencies() {
|
||||
return this.dependencies;
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return this.dependencies.isEmpty();
|
||||
}
|
||||
|
||||
public boolean isRoot() {
|
||||
return this.dependents.isEmpty();
|
||||
}
|
||||
|
||||
public void removeDependent(ComponentNode componentNode) {
|
||||
this.dependents.remove(componentNode);
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Dep {
|
||||
private final Qualified<?> anInterface;
|
||||
private final boolean set;
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Dep) {
|
||||
Dep dep = (Dep) obj;
|
||||
if (dep.anInterface.equals(this.anInterface) && dep.set == this.set) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Boolean.valueOf(this.set).hashCode() ^ ((this.anInterface.hashCode() ^ 1000003) * 1000003);
|
||||
}
|
||||
|
||||
private Dep(Qualified<?> qualified, boolean z3) {
|
||||
this.anInterface = qualified;
|
||||
this.set = z3;
|
||||
}
|
||||
}
|
||||
|
||||
public static void detect(List<Component<?>> list) {
|
||||
Set<ComponentNode> graph = toGraph(list);
|
||||
Set<ComponentNode> roots = getRoots(graph);
|
||||
int i = 0;
|
||||
while (!roots.isEmpty()) {
|
||||
ComponentNode next = roots.iterator().next();
|
||||
roots.remove(next);
|
||||
i++;
|
||||
for (ComponentNode componentNode : next.getDependencies()) {
|
||||
componentNode.removeDependent(next);
|
||||
if (componentNode.isRoot()) {
|
||||
roots.add(componentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i == list.size()) {
|
||||
return;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (ComponentNode componentNode2 : graph) {
|
||||
if (!componentNode2.isRoot() && !componentNode2.isLeaf()) {
|
||||
arrayList.add(componentNode2.getComponent());
|
||||
}
|
||||
}
|
||||
throw new DependencyCycleException(arrayList);
|
||||
}
|
||||
|
||||
private static Set<ComponentNode> getRoots(Set<ComponentNode> set) {
|
||||
HashSet hashSet = new HashSet();
|
||||
for (ComponentNode componentNode : set) {
|
||||
if (componentNode.isRoot()) {
|
||||
hashSet.add(componentNode);
|
||||
}
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
private static Set<ComponentNode> toGraph(List<Component<?>> list) {
|
||||
Set<ComponentNode> set;
|
||||
HashMap hashMap = new HashMap(list.size());
|
||||
Iterator<Component<?>> it = list.iterator();
|
||||
while (true) {
|
||||
if (!it.hasNext()) {
|
||||
Iterator it2 = hashMap.values().iterator();
|
||||
while (it2.hasNext()) {
|
||||
for (ComponentNode componentNode : (Set) it2.next()) {
|
||||
for (Dependency dependency : componentNode.getComponent().getDependencies()) {
|
||||
if (dependency.isDirectInjection() && (set = (Set) hashMap.get(new Dep(dependency.getInterface(), dependency.isSet()))) != null) {
|
||||
for (ComponentNode componentNode2 : set) {
|
||||
componentNode.addDependency(componentNode2);
|
||||
componentNode2.addDependent(componentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
HashSet hashSet = new HashSet();
|
||||
Iterator it3 = hashMap.values().iterator();
|
||||
while (it3.hasNext()) {
|
||||
hashSet.addAll((Set) it3.next());
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
Component<?> next = it.next();
|
||||
ComponentNode componentNode3 = new ComponentNode(next);
|
||||
for (Qualified<? super Object> qualified : next.getProvidedInterfaces()) {
|
||||
Dep dep = new Dep(qualified, !next.isValue());
|
||||
if (!hashMap.containsKey(dep)) {
|
||||
hashMap.put(dep, new HashSet());
|
||||
}
|
||||
Set set2 = (Set) hashMap.get(dep);
|
||||
if (!set2.isEmpty() && !dep.set) {
|
||||
throw new IllegalArgumentException("Multiple components provide " + qualified + ".");
|
||||
}
|
||||
set2.add(componentNode3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import C.w;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Dependency {
|
||||
private final Qualified<?> anInterface;
|
||||
private final int injection;
|
||||
private final int type;
|
||||
|
||||
private Dependency(Class<?> cls, int i, int i4) {
|
||||
this((Qualified<?>) Qualified.unqualified(cls), i, i4);
|
||||
}
|
||||
|
||||
public static Dependency deferred(Class<?> cls) {
|
||||
return new Dependency(cls, 0, 2);
|
||||
}
|
||||
|
||||
private static String describeInjection(int i) {
|
||||
if (i == 0) {
|
||||
return "direct";
|
||||
}
|
||||
if (i == 1) {
|
||||
return "provider";
|
||||
}
|
||||
if (i == 2) {
|
||||
return "deferred";
|
||||
}
|
||||
throw new AssertionError(com.google.android.gms.measurement.internal.a.l(i, "Unsupported injection: "));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Dependency optional(Class<?> cls) {
|
||||
return new Dependency(cls, 0, 0);
|
||||
}
|
||||
|
||||
public static Dependency optionalProvider(Class<?> cls) {
|
||||
return new Dependency(cls, 0, 1);
|
||||
}
|
||||
|
||||
public static Dependency required(Class<?> cls) {
|
||||
return new Dependency(cls, 1, 0);
|
||||
}
|
||||
|
||||
public static Dependency requiredProvider(Class<?> cls) {
|
||||
return new Dependency(cls, 1, 1);
|
||||
}
|
||||
|
||||
public static Dependency setOf(Class<?> cls) {
|
||||
return new Dependency(cls, 2, 0);
|
||||
}
|
||||
|
||||
public static Dependency setOfProvider(Class<?> cls) {
|
||||
return new Dependency(cls, 2, 1);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Dependency) {
|
||||
Dependency dependency = (Dependency) obj;
|
||||
if (this.anInterface.equals(dependency.anInterface) && this.type == dependency.type && this.injection == dependency.injection) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Qualified<?> getInterface() {
|
||||
return this.anInterface;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.injection ^ ((((this.anInterface.hashCode() ^ 1000003) * 1000003) ^ this.type) * 1000003);
|
||||
}
|
||||
|
||||
public boolean isDeferred() {
|
||||
return this.injection == 2;
|
||||
}
|
||||
|
||||
public boolean isDirectInjection() {
|
||||
return this.injection == 0;
|
||||
}
|
||||
|
||||
public boolean isRequired() {
|
||||
return this.type == 1;
|
||||
}
|
||||
|
||||
public boolean isSet() {
|
||||
return this.type == 2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("Dependency{anInterface=");
|
||||
sb.append(this.anInterface);
|
||||
sb.append(", type=");
|
||||
int i = this.type;
|
||||
sb.append(i == 1 ? "required" : i == 0 ? "optional" : "set");
|
||||
sb.append(", injection=");
|
||||
return w.r(sb, describeInjection(this.injection), "}");
|
||||
}
|
||||
|
||||
private Dependency(Qualified<?> qualified, int i, int i4) {
|
||||
this.anInterface = (Qualified) Preconditions.checkNotNull(qualified, "Null dependency anInterface.");
|
||||
this.type = i;
|
||||
this.injection = i4;
|
||||
}
|
||||
|
||||
public static Dependency deferred(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 0, 2);
|
||||
}
|
||||
|
||||
public static Dependency optionalProvider(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 0, 1);
|
||||
}
|
||||
|
||||
public static Dependency required(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 1, 0);
|
||||
}
|
||||
|
||||
public static Dependency requiredProvider(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 1, 1);
|
||||
}
|
||||
|
||||
public static Dependency setOf(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 2, 0);
|
||||
}
|
||||
|
||||
public static Dependency setOfProvider(Qualified<?> qualified) {
|
||||
return new Dependency(qualified, 2, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class DependencyCycleException extends DependencyException {
|
||||
private final List<Component<?>> componentsInCycle;
|
||||
|
||||
public DependencyCycleException(List<Component<?>> list) {
|
||||
super("Dependency cycle detected: " + Arrays.toString(list.toArray()));
|
||||
this.componentsInCycle = list;
|
||||
}
|
||||
|
||||
public List<Component<?>> getComponentsInCycle() {
|
||||
return this.componentsInCycle;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class DependencyException extends RuntimeException {
|
||||
public DependencyException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.events.Event;
|
||||
import com.google.firebase.events.EventHandler;
|
||||
import com.google.firebase.events.Publisher;
|
||||
import com.google.firebase.events.Subscriber;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class EventBus implements Subscriber, Publisher {
|
||||
private final Executor defaultExecutor;
|
||||
private final Map<Class<?>, ConcurrentHashMap<EventHandler<Object>, Executor>> handlerMap = new HashMap();
|
||||
private Queue<Event<?>> pendingEvents = new ArrayDeque();
|
||||
|
||||
public EventBus(Executor executor) {
|
||||
this.defaultExecutor = executor;
|
||||
}
|
||||
|
||||
private synchronized Set<Map.Entry<EventHandler<Object>, Executor>> getHandlers(Event<?> event) {
|
||||
ConcurrentHashMap<EventHandler<Object>, Executor> concurrentHashMap;
|
||||
try {
|
||||
concurrentHashMap = this.handlerMap.get(event.getType());
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
return concurrentHashMap == null ? Collections.EMPTY_SET : concurrentHashMap.entrySet();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static /* synthetic */ void lambda$publish$0(Map.Entry entry, Event event) {
|
||||
((EventHandler) entry.getKey()).handle(event);
|
||||
}
|
||||
|
||||
public void enablePublishingAndFlushPending() {
|
||||
Queue<Event<?>> queue;
|
||||
synchronized (this) {
|
||||
try {
|
||||
queue = this.pendingEvents;
|
||||
if (queue != null) {
|
||||
this.pendingEvents = null;
|
||||
} else {
|
||||
queue = null;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
if (queue != null) {
|
||||
Iterator<Event<?>> it = queue.iterator();
|
||||
while (it.hasNext()) {
|
||||
publish(it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.events.Publisher
|
||||
public void publish(Event<?> event) {
|
||||
Preconditions.checkNotNull(event);
|
||||
synchronized (this) {
|
||||
try {
|
||||
Queue<Event<?>> queue = this.pendingEvents;
|
||||
if (queue != null) {
|
||||
queue.add(event);
|
||||
return;
|
||||
}
|
||||
for (Map.Entry<EventHandler<Object>, Executor> entry : getHandlers(event)) {
|
||||
entry.getValue().execute(new e(2, entry, event));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.events.Subscriber
|
||||
public synchronized <T> void subscribe(Class<T> cls, Executor executor, EventHandler<? super T> eventHandler) {
|
||||
try {
|
||||
Preconditions.checkNotNull(cls);
|
||||
Preconditions.checkNotNull(eventHandler);
|
||||
Preconditions.checkNotNull(executor);
|
||||
if (!this.handlerMap.containsKey(cls)) {
|
||||
this.handlerMap.put(cls, new ConcurrentHashMap<>());
|
||||
}
|
||||
this.handlerMap.get(cls).put(eventHandler, executor);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.events.Subscriber
|
||||
public synchronized <T> void unsubscribe(Class<T> cls, EventHandler<? super T> eventHandler) {
|
||||
Preconditions.checkNotNull(cls);
|
||||
Preconditions.checkNotNull(eventHandler);
|
||||
if (this.handlerMap.containsKey(cls)) {
|
||||
ConcurrentHashMap<EventHandler<Object>, Executor> concurrentHashMap = this.handlerMap.get(cls);
|
||||
concurrentHashMap.remove(eventHandler);
|
||||
if (concurrentHashMap.isEmpty()) {
|
||||
this.handlerMap.remove(cls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.events.Subscriber
|
||||
public <T> void subscribe(Class<T> cls, EventHandler<? super T> eventHandler) {
|
||||
subscribe(cls, this.defaultExecutor, eventHandler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class InvalidRegistrarException extends RuntimeException {
|
||||
public InvalidRegistrarException(String str) {
|
||||
super(str);
|
||||
}
|
||||
|
||||
public InvalidRegistrarException(String str, Throwable th) {
|
||||
super(str, th);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Provider;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Lazy<T> implements Provider<T> {
|
||||
private static final Object UNINITIALIZED = new Object();
|
||||
private volatile Object instance;
|
||||
private volatile Provider<T> provider;
|
||||
|
||||
public Lazy(T t2) {
|
||||
this.instance = UNINITIALIZED;
|
||||
this.instance = t2;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public T get() {
|
||||
T t2;
|
||||
T t4 = (T) this.instance;
|
||||
Object obj = UNINITIALIZED;
|
||||
if (t4 != obj) {
|
||||
return t4;
|
||||
}
|
||||
synchronized (this) {
|
||||
try {
|
||||
t2 = (T) this.instance;
|
||||
if (t2 == obj) {
|
||||
t2 = this.provider.get();
|
||||
this.instance = t2;
|
||||
this.provider = null;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return t2;
|
||||
}
|
||||
|
||||
public boolean isInitialized() {
|
||||
return this.instance != UNINITIALIZED;
|
||||
}
|
||||
|
||||
public Lazy(Provider<T> provider) {
|
||||
this.instance = UNINITIALIZED;
|
||||
this.provider = provider;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class LazySet<T> implements Provider<Set<T>> {
|
||||
private volatile Set<T> actualSet = null;
|
||||
private volatile Set<Provider<T>> providers = Collections.newSetFromMap(new ConcurrentHashMap());
|
||||
|
||||
public LazySet(Collection<Provider<T>> collection) {
|
||||
this.providers.addAll(collection);
|
||||
}
|
||||
|
||||
public static LazySet<?> fromCollection(Collection<Provider<?>> collection) {
|
||||
return new LazySet<>((Set) collection);
|
||||
}
|
||||
|
||||
private synchronized void updateSet() {
|
||||
try {
|
||||
Iterator<Provider<T>> it = this.providers.iterator();
|
||||
while (it.hasNext()) {
|
||||
this.actualSet.add(it.next().get());
|
||||
}
|
||||
this.providers = null;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void add(Provider<T> provider) {
|
||||
try {
|
||||
if (this.actualSet == null) {
|
||||
this.providers.add(provider);
|
||||
} else {
|
||||
this.actualSet.add(provider.get());
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public Set<T> get() {
|
||||
if (this.actualSet == null) {
|
||||
synchronized (this) {
|
||||
try {
|
||||
if (this.actualSet == null) {
|
||||
this.actualSet = Collections.newSetFromMap(new ConcurrentHashMap());
|
||||
updateSet();
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
return Collections.unmodifiableSet(this.actualSet);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class MissingDependencyException extends DependencyException {
|
||||
public MissingDependencyException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Deferred;
|
||||
import com.google.firebase.inject.Provider;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class OptionalProvider<T> implements Provider<T>, Deferred<T> {
|
||||
private volatile Provider<T> delegate;
|
||||
private Deferred.DeferredHandler<T> handler;
|
||||
private static final Deferred.DeferredHandler<Object> NOOP_HANDLER = new Object();
|
||||
private static final Provider<Object> EMPTY_PROVIDER = new g(0);
|
||||
|
||||
private OptionalProvider(Deferred.DeferredHandler<T> deferredHandler, Provider<T> provider) {
|
||||
this.handler = deferredHandler;
|
||||
this.delegate = provider;
|
||||
}
|
||||
|
||||
public static <T> OptionalProvider<T> empty() {
|
||||
return new OptionalProvider<>(NOOP_HANDLER, EMPTY_PROVIDER);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void lambda$static$0(Provider provider) {
|
||||
}
|
||||
|
||||
public static /* synthetic */ Object lambda$static$1() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* synthetic */ void lambda$whenAvailable$2(Deferred.DeferredHandler deferredHandler, Deferred.DeferredHandler deferredHandler2, Provider provider) {
|
||||
deferredHandler.handle(provider);
|
||||
deferredHandler2.handle(provider);
|
||||
}
|
||||
|
||||
public static <T> OptionalProvider<T> of(Provider<T> provider) {
|
||||
return new OptionalProvider<>(null, provider);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public T get() {
|
||||
return this.delegate.get();
|
||||
}
|
||||
|
||||
public void set(Provider<T> provider) {
|
||||
Deferred.DeferredHandler<T> deferredHandler;
|
||||
if (this.delegate != EMPTY_PROVIDER) {
|
||||
throw new IllegalStateException("provide() can be called only once.");
|
||||
}
|
||||
synchronized (this) {
|
||||
deferredHandler = this.handler;
|
||||
this.handler = null;
|
||||
this.delegate = provider;
|
||||
}
|
||||
deferredHandler.handle(provider);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Deferred
|
||||
public void whenAvailable(final Deferred.DeferredHandler<T> deferredHandler) {
|
||||
Provider<T> provider;
|
||||
Provider<T> provider2;
|
||||
Provider<T> provider3 = this.delegate;
|
||||
Provider<Object> provider4 = EMPTY_PROVIDER;
|
||||
if (provider3 != provider4) {
|
||||
deferredHandler.handle(provider3);
|
||||
return;
|
||||
}
|
||||
synchronized (this) {
|
||||
provider = this.delegate;
|
||||
if (provider != provider4) {
|
||||
provider2 = provider;
|
||||
} else {
|
||||
final Deferred.DeferredHandler<T> deferredHandler2 = this.handler;
|
||||
this.handler = new Deferred.DeferredHandler() { // from class: com.google.firebase.components.h
|
||||
@Override // com.google.firebase.inject.Deferred.DeferredHandler
|
||||
public final void handle(Provider provider5) {
|
||||
OptionalProvider.lambda$whenAvailable$2(Deferred.DeferredHandler.this, deferredHandler, provider5);
|
||||
}
|
||||
};
|
||||
provider2 = null;
|
||||
}
|
||||
}
|
||||
if (provider2 != null) {
|
||||
deferredHandler.handle(provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Preconditions {
|
||||
public static void checkArgument(boolean z3, String str) {
|
||||
if (!z3) {
|
||||
throw new IllegalArgumentException(str);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T checkNotNull(T t2) {
|
||||
t2.getClass();
|
||||
return t2;
|
||||
}
|
||||
|
||||
public static void checkState(boolean z3, String str) {
|
||||
if (!z3) {
|
||||
throw new IllegalStateException(str);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T checkNotNull(T t2, String str) {
|
||||
if (t2 != null) {
|
||||
return t2;
|
||||
}
|
||||
throw new NullPointerException(str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Qualified<T> {
|
||||
private final Class<? extends Annotation> qualifier;
|
||||
private final Class<T> type;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface Unqualified {
|
||||
}
|
||||
|
||||
public Qualified(Class<? extends Annotation> cls, Class<T> cls2) {
|
||||
this.qualifier = cls;
|
||||
this.type = cls2;
|
||||
}
|
||||
|
||||
public static <T> Qualified<T> qualified(Class<? extends Annotation> cls, Class<T> cls2) {
|
||||
return new Qualified<>(cls, cls2);
|
||||
}
|
||||
|
||||
public static <T> Qualified<T> unqualified(Class<T> cls) {
|
||||
return new Qualified<>(Unqualified.class, cls);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || Qualified.class != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Qualified qualified = (Qualified) obj;
|
||||
if (this.type.equals(qualified.type)) {
|
||||
return this.qualifier.equals(qualified.qualifier);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.qualifier.hashCode() + (this.type.hashCode() * 31);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
if (this.qualifier == Unqualified.class) {
|
||||
return this.type.getName();
|
||||
}
|
||||
return "@" + this.qualifier.getName() + " " + this.type.getName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.events.Event;
|
||||
import com.google.firebase.events.Publisher;
|
||||
import com.google.firebase.inject.Deferred;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RestrictedComponentContainer implements ComponentContainer {
|
||||
private final Set<Qualified<?>> allowedDeferredInterfaces;
|
||||
private final Set<Qualified<?>> allowedDirectInterfaces;
|
||||
private final Set<Qualified<?>> allowedProviderInterfaces;
|
||||
private final Set<Class<?>> allowedPublishedEvents;
|
||||
private final Set<Qualified<?>> allowedSetDirectInterfaces;
|
||||
private final Set<Qualified<?>> allowedSetProviderInterfaces;
|
||||
private final ComponentContainer delegateContainer;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class RestrictedPublisher implements Publisher {
|
||||
private final Set<Class<?>> allowedPublishedEvents;
|
||||
private final Publisher delegate;
|
||||
|
||||
public RestrictedPublisher(Set<Class<?>> set, Publisher publisher) {
|
||||
this.allowedPublishedEvents = set;
|
||||
this.delegate = publisher;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.events.Publisher
|
||||
public void publish(Event<?> event) {
|
||||
if (!this.allowedPublishedEvents.contains(event.getType())) {
|
||||
throw new DependencyException(String.format("Attempting to publish an undeclared event %s.", event));
|
||||
}
|
||||
this.delegate.publish(event);
|
||||
}
|
||||
}
|
||||
|
||||
public RestrictedComponentContainer(Component<?> component, ComponentContainer componentContainer) {
|
||||
HashSet hashSet = new HashSet();
|
||||
HashSet hashSet2 = new HashSet();
|
||||
HashSet hashSet3 = new HashSet();
|
||||
HashSet hashSet4 = new HashSet();
|
||||
HashSet hashSet5 = new HashSet();
|
||||
for (Dependency dependency : component.getDependencies()) {
|
||||
if (dependency.isDirectInjection()) {
|
||||
if (dependency.isSet()) {
|
||||
hashSet4.add(dependency.getInterface());
|
||||
} else {
|
||||
hashSet.add(dependency.getInterface());
|
||||
}
|
||||
} else if (dependency.isDeferred()) {
|
||||
hashSet3.add(dependency.getInterface());
|
||||
} else if (dependency.isSet()) {
|
||||
hashSet5.add(dependency.getInterface());
|
||||
} else {
|
||||
hashSet2.add(dependency.getInterface());
|
||||
}
|
||||
}
|
||||
if (!component.getPublishedEvents().isEmpty()) {
|
||||
hashSet.add(Qualified.unqualified(Publisher.class));
|
||||
}
|
||||
this.allowedDirectInterfaces = Collections.unmodifiableSet(hashSet);
|
||||
this.allowedProviderInterfaces = Collections.unmodifiableSet(hashSet2);
|
||||
this.allowedDeferredInterfaces = Collections.unmodifiableSet(hashSet3);
|
||||
this.allowedSetDirectInterfaces = Collections.unmodifiableSet(hashSet4);
|
||||
this.allowedSetProviderInterfaces = Collections.unmodifiableSet(hashSet5);
|
||||
this.allowedPublishedEvents = component.getPublishedEvents();
|
||||
this.delegateContainer = componentContainer;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> T get(Class<T> cls) {
|
||||
if (this.allowedDirectInterfaces.contains(Qualified.unqualified(cls))) {
|
||||
T t2 = (T) this.delegateContainer.get(cls);
|
||||
return !cls.equals(Publisher.class) ? t2 : (T) new RestrictedPublisher(this.allowedPublishedEvents, (Publisher) t2);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency " + cls + ".");
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Deferred<T> getDeferred(Class<T> cls) {
|
||||
return getDeferred(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Provider<T> getProvider(Class<T> cls) {
|
||||
return getProvider(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Set<T> setOf(Qualified<T> qualified) {
|
||||
if (this.allowedSetDirectInterfaces.contains(qualified)) {
|
||||
return this.delegateContainer.setOf(qualified);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency Set<" + qualified + ">.");
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Provider<Set<T>> setOfProvider(Class<T> cls) {
|
||||
return setOfProvider(Qualified.unqualified(cls));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Deferred<T> getDeferred(Qualified<T> qualified) {
|
||||
if (this.allowedDeferredInterfaces.contains(qualified)) {
|
||||
return this.delegateContainer.getDeferred(qualified);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency Deferred<" + qualified + ">.");
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Provider<T> getProvider(Qualified<T> qualified) {
|
||||
if (this.allowedProviderInterfaces.contains(qualified)) {
|
||||
return this.delegateContainer.getProvider(qualified);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency Provider<" + qualified + ">.");
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> Provider<Set<T>> setOfProvider(Qualified<T> qualified) {
|
||||
if (this.allowedSetProviderInterfaces.contains(qualified)) {
|
||||
return this.delegateContainer.setOfProvider(qualified);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency Provider<Set<" + qualified + ">>.");
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentContainer
|
||||
public <T> T get(Qualified<T> qualified) {
|
||||
if (this.allowedDirectInterfaces.contains(qualified)) {
|
||||
return (T) this.delegateContainer.get(qualified);
|
||||
}
|
||||
throw new DependencyException("Attempting to request an undeclared dependency " + qualified + ".");
|
||||
}
|
||||
}
|
||||
44
apk_decompiled/sources/com/google/firebase/components/a.java
Normal file
44
apk_decompiled/sources/com/google/firebase/components/a.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class a implements ComponentFactory {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5922a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5923b;
|
||||
|
||||
public /* synthetic */ a(Object obj, int i) {
|
||||
this.f5922a = i;
|
||||
this.f5923b = obj;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentFactory
|
||||
public final Object create(ComponentContainer componentContainer) {
|
||||
Object lambda$of$2;
|
||||
Object lambda$intoSet$4;
|
||||
Object lambda$intoSet$3;
|
||||
Object lambda$of$0;
|
||||
Object lambda$of$1;
|
||||
int i = this.f5922a;
|
||||
Object obj = this.f5923b;
|
||||
switch (i) {
|
||||
case 0:
|
||||
lambda$of$2 = Component.lambda$of$2(obj, componentContainer);
|
||||
return lambda$of$2;
|
||||
case 1:
|
||||
lambda$intoSet$4 = Component.lambda$intoSet$4(obj, componentContainer);
|
||||
return lambda$intoSet$4;
|
||||
case 2:
|
||||
lambda$intoSet$3 = Component.lambda$intoSet$3(obj, componentContainer);
|
||||
return lambda$intoSet$3;
|
||||
case 3:
|
||||
lambda$of$0 = Component.lambda$of$0(obj, componentContainer);
|
||||
return lambda$of$0;
|
||||
default:
|
||||
lambda$of$1 = Component.lambda$of$1(obj, componentContainer);
|
||||
return lambda$of$1;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
apk_decompiled/sources/com/google/firebase/components/b.java
Normal file
37
apk_decompiled/sources/com/google/firebase/components/b.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import com.google.firebase.installations.FirebaseInstallations;
|
||||
import com.google.firebase.installations.local.IidStore;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class b implements Provider {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5924a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5925b;
|
||||
|
||||
public /* synthetic */ b(Object obj, int i) {
|
||||
this.f5924a = i;
|
||||
this.f5925b = obj;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public final Object get() {
|
||||
ComponentRegistrar instantiate;
|
||||
IidStore lambda$new$0;
|
||||
int i = this.f5924a;
|
||||
Object obj = this.f5925b;
|
||||
switch (i) {
|
||||
case 0:
|
||||
instantiate = ComponentDiscovery.instantiate((String) obj);
|
||||
return instantiate;
|
||||
default:
|
||||
lambda$new$0 = FirebaseInstallations.lambda$new$0((FirebaseApp) obj);
|
||||
return lambda$new$0;
|
||||
}
|
||||
}
|
||||
}
|
||||
31
apk_decompiled/sources/com/google/firebase/components/c.java
Normal file
31
apk_decompiled/sources/com/google/firebase/components/c.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.components.ComponentRuntime;
|
||||
import com.google.firebase.inject.Provider;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class c implements Provider {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5926a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ ComponentRegistrar f5927b;
|
||||
|
||||
public /* synthetic */ c(ComponentRegistrar componentRegistrar, int i) {
|
||||
this.f5926a = i;
|
||||
this.f5927b = componentRegistrar;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public final Object get() {
|
||||
int i = this.f5926a;
|
||||
ComponentRegistrar componentRegistrar = this.f5927b;
|
||||
switch (i) {
|
||||
case 0:
|
||||
return ComponentRuntime.c(componentRegistrar);
|
||||
default:
|
||||
return ComponentRuntime.Builder.a(componentRegistrar);
|
||||
}
|
||||
}
|
||||
}
|
||||
39
apk_decompiled/sources/com/google/firebase/components/e.java
Normal file
39
apk_decompiled/sources/com/google/firebase/components/e.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.events.Event;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class e implements Runnable {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5930a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5931b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f5932c;
|
||||
|
||||
public /* synthetic */ e(int i, Object obj, Object obj2) {
|
||||
this.f5930a = i;
|
||||
this.f5932c = obj;
|
||||
this.f5931b = obj2;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
switch (this.f5930a) {
|
||||
case 0:
|
||||
((OptionalProvider) this.f5932c).set((Provider) this.f5931b);
|
||||
return;
|
||||
case 1:
|
||||
((LazySet) this.f5932c).add((Provider) this.f5931b);
|
||||
return;
|
||||
default:
|
||||
EventBus.lambda$publish$0((Map.Entry) this.f5932c, (Event) this.f5931b);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
apk_decompiled/sources/com/google/firebase/components/f.java
Normal file
18
apk_decompiled/sources/com/google/firebase/components/f.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Deferred;
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class f implements Deferred.DeferredHandler, ComponentRegistrarProcessor {
|
||||
@Override // com.google.firebase.inject.Deferred.DeferredHandler
|
||||
public void handle(Provider provider) {
|
||||
OptionalProvider.lambda$static$0(provider);
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.components.ComponentRegistrarProcessor
|
||||
public List processRegistrar(ComponentRegistrar componentRegistrar) {
|
||||
return componentRegistrar.getComponents();
|
||||
}
|
||||
}
|
||||
25
apk_decompiled/sources/com/google/firebase/components/g.java
Normal file
25
apk_decompiled/sources/com/google/firebase/components/g.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.google.firebase.components;
|
||||
|
||||
import com.google.firebase.inject.Provider;
|
||||
import java.util.Collections;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class g implements Provider {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f5933a;
|
||||
|
||||
public /* synthetic */ g(int i) {
|
||||
this.f5933a = i;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.inject.Provider
|
||||
public final Object get() {
|
||||
switch (this.f5933a) {
|
||||
case 0:
|
||||
return OptionalProvider.a();
|
||||
default:
|
||||
return Collections.EMPTY_SET;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user