54 lines
1.8 KiB
Java
54 lines
1.8 KiB
Java
package o;
|
|
|
|
import android.app.Activity;
|
|
import android.content.Context;
|
|
import android.content.ContextWrapper;
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
/* renamed from: o.fPs, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public final class C13072fPs implements fPC<Object> {
|
|
private final Fragment a;
|
|
private volatile Object c;
|
|
private final Object d = new Object();
|
|
|
|
/* renamed from: o.fPs$HBt */
|
|
/* loaded from: classes5.dex */
|
|
public interface HBt {
|
|
InterfaceC13061fPh d();
|
|
}
|
|
|
|
public C13072fPs(Fragment fragment) {
|
|
this.a = fragment;
|
|
}
|
|
|
|
@Override // o.fPC
|
|
public final Object y_() {
|
|
if (this.c == null) {
|
|
synchronized (this.d) {
|
|
if (this.c == null) {
|
|
if (this.a.getHost() != null) {
|
|
boolean z = this.a.getHost() instanceof fPC;
|
|
Object[] objArr = {this.a.getHost().getClass()};
|
|
if (z) {
|
|
this.c = ((HBt) fOV.c(this.a.getHost(), HBt.class)).d().c(this.a).c();
|
|
} else {
|
|
throw new IllegalStateException(String.format("Hilt Fragments must be attached to an @AndroidEntryPoint Activity. Found: %s", objArr));
|
|
}
|
|
} else {
|
|
throw new NullPointerException("Hilt Fragments must be attached before creating the component.");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return this.c;
|
|
}
|
|
|
|
public static final Context e(Context context) {
|
|
while ((context instanceof ContextWrapper) && !(context instanceof Activity)) {
|
|
context = ((ContextWrapper) context).getBaseContext();
|
|
}
|
|
return context;
|
|
}
|
|
}
|