package androidx.fragment.app;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.lifecycle.Lifecycle;
import ῲ.Ԕ.K.C1522;

@SuppressLint({"BanParcelableUsage"})
public final class FragmentState implements Parcelable {
    public static final Parcelable.Creator<FragmentState> CREATOR = new C0188();

    /* renamed from: ʬ  reason: contains not printable characters */
    public final String f1303;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public Bundle f1304;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final int f1305;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public final Bundle f1306;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final boolean f1307;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final String f1308;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final String f1309;

    /* renamed from: 㑃  reason: contains not printable characters */
    public final boolean f1310;

    /* renamed from: 㗗  reason: contains not printable characters */
    public Fragment f1311;

    /* renamed from: 㳳  reason: contains not printable characters */
    public final boolean f1312;

    /* renamed from: 㴹  reason: contains not printable characters */
    public final int f1313;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final boolean f1314;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final boolean f1315;

    /* renamed from: 䁗  reason: contains not printable characters */
    public final int f1316;

    /* renamed from: androidx.fragment.app.FragmentState$K  reason: contains not printable characters */
    public static class C0188 implements Parcelable.Creator<FragmentState> {
        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // android.os.Parcelable.Creator
        public FragmentState createFromParcel(Parcel parcel) {
            return new FragmentState(parcel);
        }

        /* Return type fixed from 'java.lang.Object[]' to match base method */
        @Override // android.os.Parcelable.Creator
        public FragmentState[] newArray(int i) {
            return new FragmentState[i];
        }
    }

    public FragmentState(Fragment fragment) {
        this.f1308 = fragment.getClass().getName();
        this.f1303 = fragment.mWho;
        this.f1314 = fragment.mFromLayout;
        this.f1305 = fragment.mFragmentId;
        this.f1313 = fragment.mContainerId;
        this.f1309 = fragment.mTag;
        this.f1315 = fragment.mRetainInstance;
        this.f1307 = fragment.mRemoving;
        this.f1312 = fragment.mDetached;
        this.f1306 = fragment.mArguments;
        this.f1310 = fragment.mHidden;
        this.f1316 = fragment.mMaxState.ordinal();
    }

    public int describeContents() {
        return 0;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        sb.append("FragmentState{");
        sb.append(this.f1308);
        sb.append(" (");
        sb.append(this.f1303);
        sb.append(")}:");
        if (this.f1314) {
            sb.append(" fromLayout");
        }
        if (this.f1313 != 0) {
            sb.append(" id=0x");
            sb.append(Integer.toHexString(this.f1313));
        }
        String str = this.f1309;
        if (str != null && !str.isEmpty()) {
            sb.append(" tag=");
            sb.append(this.f1309);
        }
        if (this.f1315) {
            sb.append(" retainInstance");
        }
        if (this.f1307) {
            sb.append(" removing");
        }
        if (this.f1312) {
            sb.append(" detached");
        }
        if (this.f1310) {
            sb.append(" hidden");
        }
        return sb.toString();
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.f1308);
        parcel.writeString(this.f1303);
        parcel.writeInt(this.f1314 ? 1 : 0);
        parcel.writeInt(this.f1305);
        parcel.writeInt(this.f1313);
        parcel.writeString(this.f1309);
        parcel.writeInt(this.f1315 ? 1 : 0);
        parcel.writeInt(this.f1307 ? 1 : 0);
        parcel.writeInt(this.f1312 ? 1 : 0);
        parcel.writeBundle(this.f1306);
        parcel.writeInt(this.f1310 ? 1 : 0);
        parcel.writeBundle(this.f1304);
        parcel.writeInt(this.f1316);
    }

    /* renamed from: K  reason: contains not printable characters */
    public Fragment m684(ClassLoader classLoader, C1522 r3) {
        if (this.f1311 == null) {
            Bundle bundle = this.f1306;
            if (bundle != null) {
                bundle.setClassLoader(classLoader);
            }
            this.f1311 = r3.m3878(classLoader, this.f1308);
            this.f1311.setArguments(this.f1306);
            Bundle bundle2 = this.f1304;
            if (bundle2 != null) {
                bundle2.setClassLoader(classLoader);
                this.f1311.mSavedFragmentState = this.f1304;
            } else {
                this.f1311.mSavedFragmentState = new Bundle();
            }
            Fragment fragment = this.f1311;
            fragment.mWho = this.f1303;
            fragment.mFromLayout = this.f1314;
            fragment.mRestored = true;
            fragment.mFragmentId = this.f1305;
            fragment.mContainerId = this.f1313;
            fragment.mTag = this.f1309;
            fragment.mRetainInstance = this.f1315;
            fragment.mRemoving = this.f1307;
            fragment.mDetached = this.f1312;
            fragment.mHidden = this.f1310;
            fragment.mMaxState = Lifecycle.State.values()[this.f1316];
        }
        return this.f1311;
    }

    public FragmentState(Parcel parcel) {
        this.f1308 = parcel.readString();
        this.f1303 = parcel.readString();
        boolean z = true;
        this.f1314 = parcel.readInt() != 0;
        this.f1305 = parcel.readInt();
        this.f1313 = parcel.readInt();
        this.f1309 = parcel.readString();
        this.f1315 = parcel.readInt() != 0;
        this.f1307 = parcel.readInt() != 0;
        this.f1312 = parcel.readInt() != 0;
        this.f1306 = parcel.readBundle();
        this.f1310 = parcel.readInt() == 0 ? false : z;
        this.f1304 = parcel.readBundle();
        this.f1316 = parcel.readInt();
    }
}
