package android.support.v4.app;

import android.animation.Animator;
import android.app.Activity;
import android.arch.lifecycle.c;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Looper;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;

/* JADX INFO: compiled from: Fragment.java */
/* JADX INFO: loaded from: classes.dex */
public class e implements ComponentCallbacks, View.OnCreateContextMenuListener, android.arch.lifecycle.e, android.arch.lifecycle.q {
    private static final a.b.c.f.k<String, Class<?>> X = new a.b.c.f.k<>();
    static final Object Y = new Object();
    String A;
    boolean B;
    boolean C;
    boolean D;
    boolean E;
    boolean F;
    boolean H;
    ViewGroup I;
    View J;
    View K;
    boolean L;
    d N;
    boolean O;
    boolean P;
    float Q;
    LayoutInflater R;
    boolean S;
    android.arch.lifecycle.f U;
    android.arch.lifecycle.e V;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    Bundle f515c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    SparseArray<Parcelable> f516d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    Boolean f517e;
    String g;
    Bundle h;
    e i;
    int k;
    boolean l;
    boolean m;
    boolean n;
    boolean o;
    boolean p;
    boolean q;
    int r;
    k s;
    i t;
    k u;
    l v;
    android.arch.lifecycle.p w;
    e x;
    int y;
    int z;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    int f514b = 0;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    int f518f = -1;
    int j = -1;
    boolean G = true;
    boolean M = true;
    android.arch.lifecycle.f T = new android.arch.lifecycle.f(this);
    android.arch.lifecycle.j<android.arch.lifecycle.e> W = new android.arch.lifecycle.j<>();

    /* JADX INFO: compiled from: Fragment.java */
    class a implements Runnable {
        a() {
        }

        @Override // java.lang.Runnable
        public void run() {
            e.this.b();
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    class b extends g {
        b() {
        }

        @Override // android.support.v4.app.g
        public e a(Context context, String str, Bundle bundle) {
            return e.this.t.a(context, str, bundle);
        }

        @Override // android.support.v4.app.g
        public View b(int i) {
            View view = e.this.J;
            if (view != null) {
                return view.findViewById(i);
            }
            throw new IllegalStateException("Fragment does not have a view");
        }

        @Override // android.support.v4.app.g
        public boolean c() {
            return e.this.J != null;
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    class c implements android.arch.lifecycle.e {
        c() {
        }

        @Override // android.arch.lifecycle.e
        public android.arch.lifecycle.c a() {
            e eVar = e.this;
            if (eVar.U == null) {
                eVar.U = new android.arch.lifecycle.f(eVar.V);
            }
            return e.this.U;
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    static class d {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        View f522a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        Animator f523b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        int f524c;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        int f525d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        int f526e;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        int f527f;
        Object g = null;
        Object h;
        Object i;
        Object j;
        Object k;
        Object l;
        Boolean m;
        Boolean n;
        a0 o;
        a0 p;
        boolean q;
        f r;
        boolean s;

        d() {
            Object obj = e.Y;
            this.h = obj;
            this.i = null;
            this.j = obj;
            this.k = null;
            this.l = obj;
            this.o = null;
            this.p = null;
        }
    }

    /* JADX INFO: renamed from: android.support.v4.app.e$e, reason: collision with other inner class name */
    /* JADX INFO: compiled from: Fragment.java */
    public static class C0019e extends RuntimeException {
        public C0019e(String str, Exception exc) {
            super(str, exc);
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    interface f {
        void a();

        void b();
    }

    public static e E(Context context, String str, Bundle bundle) {
        try {
            Class<?> clsLoadClass = X.get(str);
            if (clsLoadClass == null) {
                clsLoadClass = context.getClassLoader().loadClass(str);
                X.put(str, clsLoadClass);
            }
            e eVar = (e) clsLoadClass.getConstructor(new Class[0]).newInstance(new Object[0]);
            if (bundle != null) {
                bundle.setClassLoader(eVar.getClass().getClassLoader());
                eVar.T0(bundle);
            }
            return eVar;
        } catch (ClassNotFoundException e2) {
            throw new C0019e("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e2);
        } catch (IllegalAccessException e3) {
            throw new C0019e("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e3);
        } catch (InstantiationException e4) {
            throw new C0019e("Unable to instantiate fragment " + str + ": make sure class name exists, is public, and has an empty constructor that is public", e4);
        } catch (NoSuchMethodException e5) {
            throw new C0019e("Unable to instantiate fragment " + str + ": could not find Fragment constructor", e5);
        } catch (InvocationTargetException e6) {
            throw new C0019e("Unable to instantiate fragment " + str + ": calling Fragment constructor caused an exception", e6);
        }
    }

    static boolean K(Context context, String str) {
        try {
            Class<?> clsLoadClass = X.get(str);
            if (clsLoadClass == null) {
                clsLoadClass = context.getClassLoader().loadClass(str);
                X.put(str, clsLoadClass);
            }
            return e.class.isAssignableFrom(clsLoadClass);
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

    private d d() {
        if (this.N == null) {
            this.N = new d();
        }
        return this.N;
    }

    public Object A() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.l;
        return obj == Y ? z() : obj;
    }

    void A0() {
        if (this.J != null) {
            this.U.i(c.a.ON_DESTROY);
        }
        k kVar = this.u;
        if (kVar != null) {
            kVar.w();
        }
        this.f514b = 1;
        this.H = false;
        Z();
        if (this.H) {
            s.b(this).c();
            this.q = false;
        } else {
            throw new b0("Fragment " + this + " did not call through to super.onDestroyView()");
        }
    }

    int B() {
        d dVar = this.N;
        if (dVar == null) {
            return 0;
        }
        return dVar.f524c;
    }

    void B0() {
        this.H = false;
        a0();
        this.R = null;
        if (!this.H) {
            throw new b0("Fragment " + this + " did not call through to super.onDetach()");
        }
        k kVar = this.u;
        if (kVar != null) {
            if (this.E) {
                kVar.v();
                this.u = null;
                return;
            }
            throw new IllegalStateException("Child FragmentManager of " + this + " was not  destroyed and this fragment is not retaining instance");
        }
    }

    public View C() {
        return this.J;
    }

    LayoutInflater C0(Bundle bundle) {
        LayoutInflater layoutInflaterB0 = b0(bundle);
        this.R = layoutInflaterB0;
        return layoutInflaterB0;
    }

    void D() {
        this.f518f = -1;
        this.g = null;
        this.l = false;
        this.m = false;
        this.n = false;
        this.o = false;
        this.p = false;
        this.r = 0;
        this.s = null;
        this.u = null;
        this.t = null;
        this.y = 0;
        this.z = 0;
        this.A = null;
        this.B = false;
        this.C = false;
        this.E = false;
    }

    void D0() {
        onLowMemory();
        k kVar = this.u;
        if (kVar != null) {
            kVar.x();
        }
    }

    void E0(boolean z) {
        f0(z);
        k kVar = this.u;
        if (kVar != null) {
            kVar.y(z);
        }
    }

    void F() {
        if (this.t == null) {
            throw new IllegalStateException("Fragment has not been attached yet.");
        }
        k kVar = new k();
        this.u = kVar;
        kVar.i(this.t, new b(), this);
    }

    boolean F0(MenuItem menuItem) {
        if (this.B) {
            return false;
        }
        if (this.F && this.G && g0(menuItem)) {
            return true;
        }
        k kVar = this.u;
        return kVar != null && kVar.N(menuItem);
    }

    boolean G() {
        d dVar = this.N;
        if (dVar == null) {
            return false;
        }
        return dVar.s;
    }

    void G0(Menu menu) {
        if (this.B) {
            return;
        }
        if (this.F && this.G) {
            h0(menu);
        }
        k kVar = this.u;
        if (kVar != null) {
            kVar.O(menu);
        }
    }

    final boolean H() {
        return this.r > 0;
    }

    void H0() {
        if (this.J != null) {
            this.U.i(c.a.ON_PAUSE);
        }
        this.T.i(c.a.ON_PAUSE);
        k kVar = this.u;
        if (kVar != null) {
            kVar.P();
        }
        this.f514b = 3;
        this.H = false;
        i0();
        if (this.H) {
            return;
        }
        throw new b0("Fragment " + this + " did not call through to super.onPause()");
    }

    boolean I() {
        d dVar = this.N;
        if (dVar == null) {
            return false;
        }
        return dVar.q;
    }

    void I0(boolean z) {
        j0(z);
        k kVar = this.u;
        if (kVar != null) {
            kVar.Q(z);
        }
    }

    public final boolean J() {
        k kVar = this.s;
        if (kVar == null) {
            return false;
        }
        return kVar.c();
    }

    boolean J0(Menu menu) {
        boolean z = false;
        if (this.B) {
            return false;
        }
        if (this.F && this.G) {
            k0(menu);
            z = true;
        }
        k kVar = this.u;
        return kVar != null ? z | kVar.R(menu) : z;
    }

    void K0() {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
            this.u.a0();
        }
        this.f514b = 4;
        this.H = false;
        m0();
        if (!this.H) {
            throw new b0("Fragment " + this + " did not call through to super.onResume()");
        }
        k kVar2 = this.u;
        if (kVar2 != null) {
            kVar2.S();
            this.u.a0();
        }
        this.T.i(c.a.ON_RESUME);
        if (this.J != null) {
            this.U.i(c.a.ON_RESUME);
        }
    }

    void L() {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
        }
    }

    void L0(Bundle bundle) {
        Parcelable parcelableP0;
        n0(bundle);
        k kVar = this.u;
        if (kVar == null || (parcelableP0 = kVar.P0()) == null) {
            return;
        }
        bundle.putParcelable("android:support:fragments", parcelableP0);
    }

    public void M(Bundle bundle) {
        this.H = true;
    }

    void M0() {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
            this.u.a0();
        }
        this.f514b = 3;
        this.H = false;
        o0();
        if (!this.H) {
            throw new b0("Fragment " + this + " did not call through to super.onStart()");
        }
        k kVar2 = this.u;
        if (kVar2 != null) {
            kVar2.T();
        }
        this.T.i(c.a.ON_START);
        if (this.J != null) {
            this.U.i(c.a.ON_START);
        }
    }

    public void N(int i, int i2, Intent intent) {
    }

    void N0() {
        if (this.J != null) {
            this.U.i(c.a.ON_STOP);
        }
        this.T.i(c.a.ON_STOP);
        k kVar = this.u;
        if (kVar != null) {
            kVar.V();
        }
        this.f514b = 2;
        this.H = false;
        p0();
        if (this.H) {
            return;
        }
        throw new b0("Fragment " + this + " did not call through to super.onStop()");
    }

    @Deprecated
    public void O(Activity activity) {
        this.H = true;
    }

    public final Context O0() {
        Context contextM = m();
        if (contextM != null) {
            return contextM;
        }
        throw new IllegalStateException("Fragment " + this + " not attached to a context.");
    }

    public void P(Context context) {
        this.H = true;
        i iVar = this.t;
        Activity activityD = iVar == null ? null : iVar.d();
        if (activityD != null) {
            this.H = false;
            O(activityD);
        }
    }

    void P0(Bundle bundle) {
        Parcelable parcelable;
        if (bundle == null || (parcelable = bundle.getParcelable("android:support:fragments")) == null) {
            return;
        }
        if (this.u == null) {
            F();
        }
        this.u.M0(parcelable, this.v);
        this.v = null;
        this.u.t();
    }

    public void Q(e eVar) {
    }

    final void Q0(Bundle bundle) {
        SparseArray<Parcelable> sparseArray = this.f516d;
        if (sparseArray != null) {
            this.K.restoreHierarchyState(sparseArray);
            this.f516d = null;
        }
        this.H = false;
        r0(bundle);
        if (this.H) {
            if (this.J != null) {
                this.U.i(c.a.ON_CREATE);
            }
        } else {
            throw new b0("Fragment " + this + " did not call through to super.onViewStateRestored()");
        }
    }

    public boolean R(MenuItem menuItem) {
        return false;
    }

    void R0(View view) {
        d().f522a = view;
    }

    public void S(Bundle bundle) {
        this.H = true;
        P0(bundle);
        k kVar = this.u;
        if (kVar == null || kVar.q0(1)) {
            return;
        }
        this.u.t();
    }

    void S0(Animator animator) {
        d().f523b = animator;
    }

    public Animation T(int i, boolean z, int i2) {
        return null;
    }

    public void T0(Bundle bundle) {
        if (this.f518f >= 0 && J()) {
            throw new IllegalStateException("Fragment already active and state has been saved");
        }
        this.h = bundle;
    }

    public Animator U(int i, boolean z, int i2) {
        return null;
    }

    void U0(boolean z) {
        d().s = z;
    }

    public void V(Menu menu, MenuInflater menuInflater) {
    }

    final void V0(int i, e eVar) {
        this.f518f = i;
        if (eVar == null) {
            this.g = "android:fragment:" + this.f518f;
            return;
        }
        this.g = eVar.g + ":" + this.f518f;
    }

    public View W(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return null;
    }

    void W0(int i) {
        if (this.N == null && i == 0) {
            return;
        }
        d().f525d = i;
    }

    public void X() {
        this.H = true;
        android.support.v4.app.f fVarG = g();
        boolean z = fVarG != null && fVarG.isChangingConfigurations();
        android.arch.lifecycle.p pVar = this.w;
        if (pVar == null || z) {
            return;
        }
        pVar.a();
    }

    void X0(int i, int i2) {
        if (this.N == null && i == 0 && i2 == 0) {
            return;
        }
        d();
        d dVar = this.N;
        dVar.f526e = i;
        dVar.f527f = i2;
    }

    public void Y() {
    }

    void Y0(f fVar) {
        d();
        f fVar2 = this.N.r;
        if (fVar == fVar2) {
            return;
        }
        if (fVar != null && fVar2 != null) {
            throw new IllegalStateException("Trying to set a replacement startPostponedEnterTransition on " + this);
        }
        d dVar = this.N;
        if (dVar.q) {
            dVar.r = fVar;
        }
        if (fVar != null) {
            fVar.b();
        }
    }

    public void Z() {
        this.H = true;
    }

    void Z0(int i) {
        d().f524c = i;
    }

    @Override // android.arch.lifecycle.e
    public android.arch.lifecycle.c a() {
        return this.T;
    }

    public void a0() {
        this.H = true;
    }

    public void a1() {
        k kVar = this.s;
        if (kVar == null || kVar.n == null) {
            d().q = false;
        } else if (Looper.myLooper() != this.s.n.g().getLooper()) {
            this.s.n.g().postAtFrontOfQueue(new a());
        } else {
            b();
        }
    }

    void b() {
        d dVar = this.N;
        f fVar = null;
        if (dVar != null) {
            dVar.q = false;
            f fVar2 = dVar.r;
            dVar.r = null;
            fVar = fVar2;
        }
        if (fVar != null) {
            fVar.a();
        }
    }

    public LayoutInflater b0(Bundle bundle) {
        return s(bundle);
    }

    public void c(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        printWriter.print(str);
        printWriter.print("mFragmentId=#");
        printWriter.print(Integer.toHexString(this.y));
        printWriter.print(" mContainerId=#");
        printWriter.print(Integer.toHexString(this.z));
        printWriter.print(" mTag=");
        printWriter.println(this.A);
        printWriter.print(str);
        printWriter.print("mState=");
        printWriter.print(this.f514b);
        printWriter.print(" mIndex=");
        printWriter.print(this.f518f);
        printWriter.print(" mWho=");
        printWriter.print(this.g);
        printWriter.print(" mBackStackNesting=");
        printWriter.println(this.r);
        printWriter.print(str);
        printWriter.print("mAdded=");
        printWriter.print(this.l);
        printWriter.print(" mRemoving=");
        printWriter.print(this.m);
        printWriter.print(" mFromLayout=");
        printWriter.print(this.n);
        printWriter.print(" mInLayout=");
        printWriter.println(this.o);
        printWriter.print(str);
        printWriter.print("mHidden=");
        printWriter.print(this.B);
        printWriter.print(" mDetached=");
        printWriter.print(this.C);
        printWriter.print(" mMenuVisible=");
        printWriter.print(this.G);
        printWriter.print(" mHasMenu=");
        printWriter.println(this.F);
        printWriter.print(str);
        printWriter.print("mRetainInstance=");
        printWriter.print(this.D);
        printWriter.print(" mRetaining=");
        printWriter.print(this.E);
        printWriter.print(" mUserVisibleHint=");
        printWriter.println(this.M);
        if (this.s != null) {
            printWriter.print(str);
            printWriter.print("mFragmentManager=");
            printWriter.println(this.s);
        }
        if (this.t != null) {
            printWriter.print(str);
            printWriter.print("mHost=");
            printWriter.println(this.t);
        }
        if (this.x != null) {
            printWriter.print(str);
            printWriter.print("mParentFragment=");
            printWriter.println(this.x);
        }
        if (this.h != null) {
            printWriter.print(str);
            printWriter.print("mArguments=");
            printWriter.println(this.h);
        }
        if (this.f515c != null) {
            printWriter.print(str);
            printWriter.print("mSavedFragmentState=");
            printWriter.println(this.f515c);
        }
        if (this.f516d != null) {
            printWriter.print(str);
            printWriter.print("mSavedViewState=");
            printWriter.println(this.f516d);
        }
        if (this.i != null) {
            printWriter.print(str);
            printWriter.print("mTarget=");
            printWriter.print(this.i);
            printWriter.print(" mTargetRequestCode=");
            printWriter.println(this.k);
        }
        if (t() != 0) {
            printWriter.print(str);
            printWriter.print("mNextAnim=");
            printWriter.println(t());
        }
        if (this.I != null) {
            printWriter.print(str);
            printWriter.print("mContainer=");
            printWriter.println(this.I);
        }
        if (this.J != null) {
            printWriter.print(str);
            printWriter.print("mView=");
            printWriter.println(this.J);
        }
        if (this.K != null) {
            printWriter.print(str);
            printWriter.print("mInnerView=");
            printWriter.println(this.J);
        }
        if (j() != null) {
            printWriter.print(str);
            printWriter.print("mAnimatingAway=");
            printWriter.println(j());
            printWriter.print(str);
            printWriter.print("mStateAfterAnimating=");
            printWriter.println(B());
        }
        if (m() != null) {
            s.b(this).a(str, fileDescriptor, printWriter, strArr);
        }
        if (this.u != null) {
            printWriter.print(str);
            printWriter.println("Child " + this.u + ":");
            this.u.a(str + "  ", fileDescriptor, printWriter, strArr);
        }
    }

    public void c0(boolean z) {
    }

    @Deprecated
    public void d0(Activity activity, AttributeSet attributeSet, Bundle bundle) {
        this.H = true;
    }

    e e(String str) {
        if (str.equals(this.g)) {
            return this;
        }
        k kVar = this.u;
        if (kVar != null) {
            return kVar.g0(str);
        }
        return null;
    }

    public void e0(Context context, AttributeSet attributeSet, Bundle bundle) {
        this.H = true;
        i iVar = this.t;
        Activity activityD = iVar == null ? null : iVar.d();
        if (activityD != null) {
            this.H = false;
            d0(activityD, attributeSet, bundle);
        }
    }

    public final boolean equals(Object obj) {
        return super.equals(obj);
    }

    @Override // android.arch.lifecycle.q
    public android.arch.lifecycle.p f() {
        if (m() == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        if (this.w == null) {
            this.w = new android.arch.lifecycle.p();
        }
        return this.w;
    }

    public void f0(boolean z) {
    }

    public final android.support.v4.app.f g() {
        i iVar = this.t;
        if (iVar == null) {
            return null;
        }
        return (android.support.v4.app.f) iVar.d();
    }

    public boolean g0(MenuItem menuItem) {
        return false;
    }

    public boolean h() {
        Boolean bool;
        d dVar = this.N;
        if (dVar == null || (bool = dVar.n) == null) {
            return true;
        }
        return bool.booleanValue();
    }

    public void h0(Menu menu) {
    }

    public final int hashCode() {
        return super.hashCode();
    }

    public boolean i() {
        Boolean bool;
        d dVar = this.N;
        if (dVar == null || (bool = dVar.m) == null) {
            return true;
        }
        return bool.booleanValue();
    }

    public void i0() {
        this.H = true;
    }

    View j() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.f522a;
    }

    public void j0(boolean z) {
    }

    Animator k() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.f523b;
    }

    public void k0(Menu menu) {
    }

    public final j l() {
        if (this.u == null) {
            F();
            int i = this.f514b;
            if (i >= 4) {
                this.u.S();
            } else if (i >= 3) {
                this.u.T();
            } else if (i >= 2) {
                this.u.q();
            } else if (i >= 1) {
                this.u.t();
            }
        }
        return this.u;
    }

    public void l0(int i, String[] strArr, int[] iArr) {
    }

    public Context m() {
        i iVar = this.t;
        if (iVar == null) {
            return null;
        }
        return iVar.e();
    }

    public void m0() {
        this.H = true;
    }

    public Object n() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.g;
    }

    public void n0(Bundle bundle) {
    }

    a0 o() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.o;
    }

    public void o0() {
        this.H = true;
    }

    @Override // android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
        this.H = true;
    }

    @Override // android.view.View.OnCreateContextMenuListener
    public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
        g().onCreateContextMenu(contextMenu, view, contextMenuInfo);
    }

    @Override // android.content.ComponentCallbacks
    public void onLowMemory() {
        this.H = true;
    }

    public Object p() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.i;
    }

    public void p0() {
        this.H = true;
    }

    a0 q() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.p;
    }

    public void q0(View view, Bundle bundle) {
    }

    public final j r() {
        return this.s;
    }

    public void r0(Bundle bundle) {
        this.H = true;
    }

    @Deprecated
    public LayoutInflater s(Bundle bundle) {
        i iVar = this.t;
        if (iVar == null) {
            throw new IllegalStateException("onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager.");
        }
        LayoutInflater layoutInflaterJ = iVar.j();
        l();
        k kVar = this.u;
        kVar.n0();
        a.b.c.g.f.b(layoutInflaterJ, kVar);
        return layoutInflaterJ;
    }

    j s0() {
        return this.u;
    }

    int t() {
        d dVar = this.N;
        if (dVar == null) {
            return 0;
        }
        return dVar.f525d;
    }

    void t0(Bundle bundle) {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
        }
        this.f514b = 2;
        this.H = false;
        M(bundle);
        if (this.H) {
            k kVar2 = this.u;
            if (kVar2 != null) {
                kVar2.q();
                return;
            }
            return;
        }
        throw new b0("Fragment " + this + " did not call through to super.onActivityCreated()");
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        a.b.c.f.d.a(this, sb);
        if (this.f518f >= 0) {
            sb.append(" #");
            sb.append(this.f518f);
        }
        if (this.y != 0) {
            sb.append(" id=0x");
            sb.append(Integer.toHexString(this.y));
        }
        if (this.A != null) {
            sb.append(" ");
            sb.append(this.A);
        }
        sb.append('}');
        return sb.toString();
    }

    int u() {
        d dVar = this.N;
        if (dVar == null) {
            return 0;
        }
        return dVar.f526e;
    }

    void u0(Configuration configuration) {
        onConfigurationChanged(configuration);
        k kVar = this.u;
        if (kVar != null) {
            kVar.r(configuration);
        }
    }

    int v() {
        d dVar = this.N;
        if (dVar == null) {
            return 0;
        }
        return dVar.f527f;
    }

    boolean v0(MenuItem menuItem) {
        if (this.B) {
            return false;
        }
        if (R(menuItem)) {
            return true;
        }
        k kVar = this.u;
        return kVar != null && kVar.s(menuItem);
    }

    public Object w() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.j;
        return obj == Y ? p() : obj;
    }

    void w0(Bundle bundle) {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
        }
        this.f514b = 1;
        this.H = false;
        S(bundle);
        this.S = true;
        if (this.H) {
            this.T.i(c.a.ON_CREATE);
            return;
        }
        throw new b0("Fragment " + this + " did not call through to super.onCreate()");
    }

    public final Resources x() {
        return O0().getResources();
    }

    boolean x0(Menu menu, MenuInflater menuInflater) {
        boolean z = false;
        if (this.B) {
            return false;
        }
        if (this.F && this.G) {
            V(menu, menuInflater);
            z = true;
        }
        k kVar = this.u;
        return kVar != null ? z | kVar.u(menu, menuInflater) : z;
    }

    public Object y() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.h;
        return obj == Y ? n() : obj;
    }

    void y0(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        k kVar = this.u;
        if (kVar != null) {
            kVar.D0();
        }
        this.q = true;
        this.V = new c();
        this.U = null;
        View viewW = W(layoutInflater, viewGroup, bundle);
        this.J = viewW;
        if (viewW != null) {
            this.V.a();
            this.W.m(this.V);
        } else {
            if (this.U != null) {
                throw new IllegalStateException("Called getViewLifecycleOwner() but onCreateView() returned null");
            }
            this.V = null;
        }
    }

    public Object z() {
        d dVar = this.N;
        if (dVar == null) {
            return null;
        }
        return dVar.k;
    }

    void z0() {
        this.T.i(c.a.ON_DESTROY);
        k kVar = this.u;
        if (kVar != null) {
            kVar.v();
        }
        this.f514b = 0;
        this.H = false;
        this.S = false;
        X();
        if (this.H) {
            this.u = null;
            return;
        }
        throw new b0("Fragment " + this + " did not call through to super.onDestroy()");
    }
}
