what-the-bank/sources/com/google/firebase/platforminfo/LibraryVersionComponent.java

41 lines
1.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.platforminfo;
import android.content.Context;
import com.google.firebase.components.Component;
import com.google.firebase.components.ComponentContainer;
import com.google.firebase.components.ComponentFactory;
import com.google.firebase.components.Dependency;
import com.google.firebase.platforminfo.LibraryVersionComponent;
/* loaded from: classes.dex */
public class LibraryVersionComponent {
/* loaded from: classes.dex */
public interface VersionExtractor<T> {
String extract(T t);
}
public static Component<?> create(String str, String str2) {
return Component.intoSet(LibraryVersion.create(str, str2), LibraryVersion.class);
}
public static Component<?> fromContext(final String str, final VersionExtractor<Context> versionExtractor) {
return Component.intoSetBuilder(LibraryVersion.class).add(Dependency.required(Context.class)).factory(new ComponentFactory(str, versionExtractor) { // from class: com.google.firebase.platforminfo.LibraryVersionComponent$$ExternalSyntheticLambda0
public final String f$0;
public final LibraryVersionComponent.VersionExtractor f$1;
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
LibraryVersion create;
create = LibraryVersion.create(this.f$0, this.f$1.extract((Context) componentContainer.get(Context.class)));
return create;
}
{
this.f$0 = str;
this.f$1 = versionExtractor;
}
}).build();
}
}