package g.h.a;

import android.animation.Animator;
import android.app.Activity;
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 androidx.lifecycle.e;
import androidx.lifecycle.s;
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 c implements ComponentCallbacks, View.OnCreateContextMenuListener, androidx.lifecycle.g, s {
    private static final g.c.g<String, Class<?>> Y = new g.c.g<>();
    static final Object Z = new Object();
    int A;
    String B;
    boolean C;
    boolean D;
    boolean E;
    boolean F;
    boolean G;
    boolean I;
    ViewGroup J;
    View K;
    View L;
    boolean M;
    d O;
    boolean P;
    boolean Q;
    float R;
    LayoutInflater S;
    boolean T;
    androidx.lifecycle.h V;
    androidx.lifecycle.g W;
    Bundle d;
    SparseArray<Parcelable> e;
    Boolean f;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    String f528h;

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

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

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

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    boolean f533m;
    boolean n;
    boolean o;
    boolean p;
    boolean q;
    boolean r;
    int s;
    i t;
    g u;
    i v;
    j w;
    androidx.lifecycle.r x;
    c y;
    int z;
    int b = 0;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    int f527g = -1;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    int f531k = -1;
    boolean H = true;
    boolean N = true;
    androidx.lifecycle.h U = new androidx.lifecycle.h(this);
    androidx.lifecycle.l<androidx.lifecycle.g> X = new androidx.lifecycle.l<>();

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

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

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

        @Override // g.h.a.e
        public c a(Context context, String str, Bundle bundle) {
            return c.this.u.a(context, str, bundle);
        }

        @Override // g.h.a.e
        public View b(int i2) {
            View view = c.this.K;
            if (view != null) {
                return view.findViewById(i2);
            }
            throw new IllegalStateException("Fragment does not have a view");
        }

        @Override // g.h.a.e
        public boolean c() {
            return c.this.K != null;
        }
    }

    /* JADX INFO: renamed from: g.h.a.c$c, reason: collision with other inner class name */
    /* JADX INFO: compiled from: Fragment.java */
    class C0032c implements androidx.lifecycle.g {
        C0032c() {
        }

        @Override // androidx.lifecycle.g
        public androidx.lifecycle.e b() {
            c cVar = c.this;
            if (cVar.V == null) {
                cVar.V = new androidx.lifecycle.h(cVar.W);
            }
            return c.this.V;
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    static class d {
        View a;
        Animator b;
        int c;
        int d;
        int e;
        int f;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        Object f534g = null;

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        Object f535h;

        /* JADX INFO: renamed from: i, reason: collision with root package name */
        Object f536i;

        /* JADX INFO: renamed from: j, reason: collision with root package name */
        Object f537j;

        /* JADX INFO: renamed from: k, reason: collision with root package name */
        Object f538k;

        /* JADX INFO: renamed from: l, reason: collision with root package name */
        Object f539l;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        Boolean f540m;
        Boolean n;
        androidx.core.app.f o;
        androidx.core.app.f p;
        boolean q;
        f r;
        boolean s;

        d() {
            Object obj = c.Z;
            this.f535h = obj;
            this.f536i = null;
            this.f537j = obj;
            this.f538k = null;
            this.f539l = obj;
            this.o = null;
            this.p = null;
        }
    }

    /* JADX INFO: compiled from: Fragment.java */
    public static class e extends RuntimeException {
        public e(String str, Exception exc) {
            super(str, exc);
        }
    }

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

        void b();
    }

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

    public static c j0(Context context, String str, Bundle bundle) {
        try {
            Class<?> clsLoadClass = Y.get(str);
            if (clsLoadClass == null) {
                clsLoadClass = context.getClassLoader().loadClass(str);
                Y.put(str, clsLoadClass);
            }
            c cVar = (c) clsLoadClass.getConstructor(new Class[0]).newInstance(new Object[0]);
            if (bundle != null) {
                bundle.setClassLoader(cVar.getClass().getClassLoader());
                cVar.y1(bundle);
            }
            return cVar;
        } catch (ClassNotFoundException e2) {
            throw new e("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 e("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 e("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 e("Unable to instantiate fragment " + str + ": could not find Fragment constructor", e5);
        } catch (InvocationTargetException e6) {
            throw new e("Unable to instantiate fragment " + str + ": calling Fragment constructor caused an exception", e6);
        }
    }

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

    @Override // androidx.lifecycle.s
    public androidx.lifecycle.r A() {
        if (P() == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        if (this.x == null) {
            this.x = new androidx.lifecycle.r();
        }
        return this.x;
    }

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

    final void A1(int i2, c cVar) {
        this.f527g = i2;
        if (cVar == null) {
            this.f528h = "android:fragment:" + this.f527g;
            return;
        }
        this.f528h = cVar.f528h + ":" + this.f527g;
    }

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

    void B1(int i2) {
        if (this.O == null && i2 == 0) {
            return;
        }
        G().d = i2;
    }

    public void C0() {
        this.I = true;
        g.h.a.d dVarI = I();
        boolean z = dVarI != null && dVarI.isChangingConfigurations();
        androidx.lifecycle.r rVar = this.x;
        if (rVar == null || z) {
            return;
        }
        rVar.a();
    }

    void C1(int i2, int i3) {
        if (this.O == null && i2 == 0 && i3 == 0) {
            return;
        }
        G();
        d dVar = this.O;
        dVar.e = i2;
        dVar.f = i3;
    }

    public void D0() {
    }

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

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

    public void E0() {
        this.I = true;
    }

    void E1(int i2) {
        G().c = i2;
    }

    public void F(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        printWriter.print(str);
        printWriter.print("mFragmentId=#");
        printWriter.print(Integer.toHexString(this.z));
        printWriter.print(" mContainerId=#");
        printWriter.print(Integer.toHexString(this.A));
        printWriter.print(" mTag=");
        printWriter.println(this.B);
        printWriter.print(str);
        printWriter.print("mState=");
        printWriter.print(this.b);
        printWriter.print(" mIndex=");
        printWriter.print(this.f527g);
        printWriter.print(" mWho=");
        printWriter.print(this.f528h);
        printWriter.print(" mBackStackNesting=");
        printWriter.println(this.s);
        printWriter.print(str);
        printWriter.print("mAdded=");
        printWriter.print(this.f533m);
        printWriter.print(" mRemoving=");
        printWriter.print(this.n);
        printWriter.print(" mFromLayout=");
        printWriter.print(this.o);
        printWriter.print(" mInLayout=");
        printWriter.println(this.p);
        printWriter.print(str);
        printWriter.print("mHidden=");
        printWriter.print(this.C);
        printWriter.print(" mDetached=");
        printWriter.print(this.D);
        printWriter.print(" mMenuVisible=");
        printWriter.print(this.H);
        printWriter.print(" mHasMenu=");
        printWriter.println(this.G);
        printWriter.print(str);
        printWriter.print("mRetainInstance=");
        printWriter.print(this.E);
        printWriter.print(" mRetaining=");
        printWriter.print(this.F);
        printWriter.print(" mUserVisibleHint=");
        printWriter.println(this.N);
        if (this.t != null) {
            printWriter.print(str);
            printWriter.print("mFragmentManager=");
            printWriter.println(this.t);
        }
        if (this.u != null) {
            printWriter.print(str);
            printWriter.print("mHost=");
            printWriter.println(this.u);
        }
        if (this.y != null) {
            printWriter.print(str);
            printWriter.print("mParentFragment=");
            printWriter.println(this.y);
        }
        if (this.f529i != null) {
            printWriter.print(str);
            printWriter.print("mArguments=");
            printWriter.println(this.f529i);
        }
        if (this.d != null) {
            printWriter.print(str);
            printWriter.print("mSavedFragmentState=");
            printWriter.println(this.d);
        }
        if (this.e != null) {
            printWriter.print(str);
            printWriter.print("mSavedViewState=");
            printWriter.println(this.e);
        }
        if (this.f530j != null) {
            printWriter.print(str);
            printWriter.print("mTarget=");
            printWriter.print(this.f530j);
            printWriter.print(" mTargetRequestCode=");
            printWriter.println(this.f532l);
        }
        if (W() != 0) {
            printWriter.print(str);
            printWriter.print("mNextAnim=");
            printWriter.println(W());
        }
        if (this.J != null) {
            printWriter.print(str);
            printWriter.print("mContainer=");
            printWriter.println(this.J);
        }
        if (this.K != null) {
            printWriter.print(str);
            printWriter.print("mView=");
            printWriter.println(this.K);
        }
        if (this.L != null) {
            printWriter.print(str);
            printWriter.print("mInnerView=");
            printWriter.println(this.K);
        }
        if (L() != null) {
            printWriter.print(str);
            printWriter.print("mAnimatingAway=");
            printWriter.println(L());
            printWriter.print(str);
            printWriter.print("mStateAfterAnimating=");
            printWriter.println(e0());
        }
        if (P() != null) {
            g.j.a.a.b(this).a(str, fileDescriptor, printWriter, strArr);
        }
        if (this.v != null) {
            printWriter.print(str);
            printWriter.println("Child " + this.v + ":");
            this.v.a(str + "  ", fileDescriptor, printWriter, strArr);
        }
    }

    public void F0() {
        this.I = true;
    }

    public void F1() {
        i iVar = this.t;
        if (iVar == null || iVar.o == null) {
            G().q = false;
        } else if (Looper.myLooper() != this.t.o.g().getLooper()) {
            this.t.o.g().postAtFrontOfQueue(new a());
        } else {
            E();
        }
    }

    public LayoutInflater G0(Bundle bundle) {
        return V(bundle);
    }

    c H(String str) {
        if (str.equals(this.f528h)) {
            return this;
        }
        i iVar = this.v;
        if (iVar != null) {
            return iVar.g0(str);
        }
        return null;
    }

    public void H0(boolean z) {
    }

    public final g.h.a.d I() {
        g gVar = this.u;
        if (gVar == null) {
            return null;
        }
        return (g.h.a.d) gVar.d();
    }

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

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

    public void J0(Context context, AttributeSet attributeSet, Bundle bundle) {
        this.I = true;
        g gVar = this.u;
        Activity activityD = gVar == null ? null : gVar.d();
        if (activityD != null) {
            this.I = false;
            I0(activityD, attributeSet, bundle);
        }
    }

    public boolean K() {
        Boolean bool;
        d dVar = this.O;
        if (dVar == null || (bool = dVar.f540m) == null) {
            return true;
        }
        return bool.booleanValue();
    }

    public void K0(boolean z) {
    }

    View L() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.a;
    }

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

    Animator M() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.b;
    }

    public void M0(Menu menu) {
    }

    public final Bundle N() {
        return this.f529i;
    }

    public void N0() {
        this.I = true;
    }

    public final h O() {
        if (this.v == null) {
            k0();
            int i2 = this.b;
            if (i2 >= 4) {
                this.v.S();
            } else if (i2 >= 3) {
                this.v.T();
            } else if (i2 >= 2) {
                this.v.q();
            } else if (i2 >= 1) {
                this.v.t();
            }
        }
        return this.v;
    }

    public void O0(boolean z) {
    }

    public Context P() {
        g gVar = this.u;
        if (gVar == null) {
            return null;
        }
        return gVar.e();
    }

    public void P0(Menu menu) {
    }

    public Object Q() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.f534g;
    }

    public void Q0(int i2, String[] strArr, int[] iArr) {
    }

    androidx.core.app.f R() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.o;
    }

    public void R0() {
        this.I = true;
    }

    public Object S() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.f536i;
    }

    public void S0(Bundle bundle) {
    }

    androidx.core.app.f T() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.p;
    }

    public void T0() {
        this.I = true;
    }

    public final h U() {
        return this.t;
    }

    public void U0() {
        this.I = true;
    }

    @Deprecated
    public LayoutInflater V(Bundle bundle) {
        g gVar = this.u;
        if (gVar == null) {
            throw new IllegalStateException("onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager.");
        }
        LayoutInflater layoutInflaterJ = gVar.j();
        O();
        i iVar = this.v;
        iVar.n0();
        g.e.j.e.b(layoutInflaterJ, iVar);
        return layoutInflaterJ;
    }

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

    int W() {
        d dVar = this.O;
        if (dVar == null) {
            return 0;
        }
        return dVar.d;
    }

    public void W0(Bundle bundle) {
        this.I = true;
    }

    int X() {
        d dVar = this.O;
        if (dVar == null) {
            return 0;
        }
        return dVar.e;
    }

    h X0() {
        return this.v;
    }

    int Y() {
        d dVar = this.O;
        if (dVar == null) {
            return 0;
        }
        return dVar.f;
    }

    void Y0(Bundle bundle) {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
        }
        this.b = 2;
        this.I = false;
        r0(bundle);
        if (this.I) {
            i iVar2 = this.v;
            if (iVar2 != null) {
                iVar2.q();
                return;
            }
            return;
        }
        throw new r("Fragment " + this + " did not call through to super.onActivityCreated()");
    }

    public Object Z() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.f537j;
        return obj == Z ? S() : obj;
    }

    void Z0(Configuration configuration) {
        onConfigurationChanged(configuration);
        i iVar = this.v;
        if (iVar != null) {
            iVar.r(configuration);
        }
    }

    public final Resources a0() {
        return t1().getResources();
    }

    boolean a1(MenuItem menuItem) {
        if (this.C) {
            return false;
        }
        if (w0(menuItem)) {
            return true;
        }
        i iVar = this.v;
        return iVar != null && iVar.s(menuItem);
    }

    @Override // androidx.lifecycle.g
    public androidx.lifecycle.e b() {
        return this.U;
    }

    public Object b0() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.f535h;
        return obj == Z ? Q() : obj;
    }

    void b1(Bundle bundle) {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
        }
        this.b = 1;
        this.I = false;
        x0(bundle);
        this.T = true;
        if (this.I) {
            this.U.i(e.a.ON_CREATE);
            return;
        }
        throw new r("Fragment " + this + " did not call through to super.onCreate()");
    }

    public Object c0() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        return dVar.f538k;
    }

    boolean c1(Menu menu, MenuInflater menuInflater) {
        boolean z = false;
        if (this.C) {
            return false;
        }
        if (this.G && this.H) {
            A0(menu, menuInflater);
            z = true;
        }
        i iVar = this.v;
        return iVar != null ? z | iVar.u(menu, menuInflater) : z;
    }

    public Object d0() {
        d dVar = this.O;
        if (dVar == null) {
            return null;
        }
        Object obj = dVar.f539l;
        return obj == Z ? c0() : obj;
    }

    void d1(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
        }
        this.r = true;
        this.W = new C0032c();
        this.V = null;
        View viewB0 = B0(layoutInflater, viewGroup, bundle);
        this.K = viewB0;
        if (viewB0 != null) {
            this.W.b();
            this.X.j(this.W);
        } else {
            if (this.V != null) {
                throw new IllegalStateException("Called getViewLifecycleOwner() but onCreateView() returned null");
            }
            this.W = null;
        }
    }

    int e0() {
        d dVar = this.O;
        if (dVar == null) {
            return 0;
        }
        return dVar.c;
    }

    void e1() {
        this.U.i(e.a.ON_DESTROY);
        i iVar = this.v;
        if (iVar != null) {
            iVar.v();
        }
        this.b = 0;
        this.I = false;
        this.T = false;
        C0();
        if (this.I) {
            this.v = null;
            return;
        }
        throw new r("Fragment " + this + " did not call through to super.onDestroy()");
    }

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

    public final String f0(int i2) {
        return a0().getString(i2);
    }

    void f1() {
        if (this.K != null) {
            this.V.i(e.a.ON_DESTROY);
        }
        i iVar = this.v;
        if (iVar != null) {
            iVar.w();
        }
        this.b = 1;
        this.I = false;
        E0();
        if (this.I) {
            g.j.a.a.b(this).c();
            this.r = false;
        } else {
            throw new r("Fragment " + this + " did not call through to super.onDestroyView()");
        }
    }

    public final String g0(int i2, Object... objArr) {
        return a0().getString(i2, objArr);
    }

    void g1() {
        this.I = false;
        F0();
        this.S = null;
        if (!this.I) {
            throw new r("Fragment " + this + " did not call through to super.onDetach()");
        }
        i iVar = this.v;
        if (iVar != null) {
            if (this.F) {
                iVar.v();
                this.v = null;
                return;
            }
            throw new IllegalStateException("Child FragmentManager of " + this + " was not  destroyed and this fragment is not retaining instance");
        }
    }

    public View h0() {
        return this.K;
    }

    LayoutInflater h1(Bundle bundle) {
        LayoutInflater layoutInflaterG0 = G0(bundle);
        this.S = layoutInflaterG0;
        return layoutInflaterG0;
    }

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

    void i0() {
        this.f527g = -1;
        this.f528h = null;
        this.f533m = false;
        this.n = false;
        this.o = false;
        this.p = false;
        this.q = false;
        this.s = 0;
        this.t = null;
        this.v = null;
        this.u = null;
        this.z = 0;
        this.A = 0;
        this.B = null;
        this.C = false;
        this.D = false;
        this.F = false;
    }

    void i1() {
        onLowMemory();
        i iVar = this.v;
        if (iVar != null) {
            iVar.x();
        }
    }

    void j1(boolean z) {
        K0(z);
        i iVar = this.v;
        if (iVar != null) {
            iVar.y(z);
        }
    }

    void k0() {
        if (this.u == null) {
            throw new IllegalStateException("Fragment has not been attached yet.");
        }
        i iVar = new i();
        this.v = iVar;
        iVar.i(this.u, new b(), this);
    }

    boolean k1(MenuItem menuItem) {
        if (this.C) {
            return false;
        }
        if (this.G && this.H && L0(menuItem)) {
            return true;
        }
        i iVar = this.v;
        return iVar != null && iVar.N(menuItem);
    }

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

    void l1(Menu menu) {
        if (this.C) {
            return;
        }
        if (this.G && this.H) {
            M0(menu);
        }
        i iVar = this.v;
        if (iVar != null) {
            iVar.O(menu);
        }
    }

    final boolean m0() {
        return this.s > 0;
    }

    void m1() {
        if (this.K != null) {
            this.V.i(e.a.ON_PAUSE);
        }
        this.U.i(e.a.ON_PAUSE);
        i iVar = this.v;
        if (iVar != null) {
            iVar.P();
        }
        this.b = 3;
        this.I = false;
        N0();
        if (this.I) {
            return;
        }
        throw new r("Fragment " + this + " did not call through to super.onPause()");
    }

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

    void n1(boolean z) {
        O0(z);
        i iVar = this.v;
        if (iVar != null) {
            iVar.Q(z);
        }
    }

    public final boolean o0() {
        i iVar = this.t;
        if (iVar == null) {
            return false;
        }
        return iVar.c();
    }

    boolean o1(Menu menu) {
        boolean z = false;
        if (this.C) {
            return false;
        }
        if (this.G && this.H) {
            P0(menu);
            z = true;
        }
        i iVar = this.v;
        return iVar != null ? z | iVar.R(menu) : z;
    }

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

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

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

    void p1() {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
            this.v.a0();
        }
        this.b = 4;
        this.I = false;
        R0();
        if (!this.I) {
            throw new r("Fragment " + this + " did not call through to super.onResume()");
        }
        i iVar2 = this.v;
        if (iVar2 != null) {
            iVar2.S();
            this.v.a0();
        }
        this.U.i(e.a.ON_RESUME);
        if (this.K != null) {
            this.V.i(e.a.ON_RESUME);
        }
    }

    void q0() {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
        }
    }

    void q1(Bundle bundle) {
        Parcelable parcelableP0;
        S0(bundle);
        i iVar = this.v;
        if (iVar == null || (parcelableP0 = iVar.P0()) == null) {
            return;
        }
        bundle.putParcelable("android:support:fragments", parcelableP0);
    }

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

    void r1() {
        i iVar = this.v;
        if (iVar != null) {
            iVar.D0();
            this.v.a0();
        }
        this.b = 3;
        this.I = false;
        T0();
        if (!this.I) {
            throw new r("Fragment " + this + " did not call through to super.onStart()");
        }
        i iVar2 = this.v;
        if (iVar2 != null) {
            iVar2.T();
        }
        this.U.i(e.a.ON_START);
        if (this.K != null) {
            this.V.i(e.a.ON_START);
        }
    }

    public void s0(int i2, int i3, Intent intent) {
    }

    void s1() {
        if (this.K != null) {
            this.V.i(e.a.ON_STOP);
        }
        this.U.i(e.a.ON_STOP);
        i iVar = this.v;
        if (iVar != null) {
            iVar.V();
        }
        this.b = 2;
        this.I = false;
        U0();
        if (this.I) {
            return;
        }
        throw new r("Fragment " + this + " did not call through to super.onStop()");
    }

    @Deprecated
    public void t0(Activity activity) {
        this.I = true;
    }

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

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        g.e.i.a.a(this, sb);
        if (this.f527g >= 0) {
            sb.append(" #");
            sb.append(this.f527g);
        }
        if (this.z != 0) {
            sb.append(" id=0x");
            sb.append(Integer.toHexString(this.z));
        }
        if (this.B != null) {
            sb.append(" ");
            sb.append(this.B);
        }
        sb.append('}');
        return sb.toString();
    }

    public void u0(Context context) {
        this.I = true;
        g gVar = this.u;
        Activity activityD = gVar == null ? null : gVar.d();
        if (activityD != null) {
            this.I = false;
            t0(activityD);
        }
    }

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

    public void v0(c cVar) {
    }

    final void v1(Bundle bundle) {
        SparseArray<Parcelable> sparseArray = this.e;
        if (sparseArray != null) {
            this.L.restoreHierarchyState(sparseArray);
            this.e = null;
        }
        this.I = false;
        W0(bundle);
        if (this.I) {
            if (this.K != null) {
                this.V.i(e.a.ON_CREATE);
            }
        } else {
            throw new r("Fragment " + this + " did not call through to super.onViewStateRestored()");
        }
    }

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

    void w1(View view) {
        G().a = view;
    }

    public void x0(Bundle bundle) {
        this.I = true;
        u1(bundle);
        i iVar = this.v;
        if (iVar == null || iVar.q0(1)) {
            return;
        }
        this.v.t();
    }

    void x1(Animator animator) {
        G().b = animator;
    }

    public Animation y0(int i2, boolean z, int i3) {
        return null;
    }

    public void y1(Bundle bundle) {
        if (this.f527g >= 0 && o0()) {
            throw new IllegalStateException("Fragment already active and state has been saved");
        }
        this.f529i = bundle;
    }

    public Animator z0(int i2, boolean z, int i3) {
        return null;
    }

    void z1(boolean z) {
        G().s = z;
    }
}
