package androidx.fragment.app;

import X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0;
import X6FRs_4.IMuAHx_6.Mqv2r_3.XnFJ5_9;
import X6FRs_4.KNBe_11.H5YG8fq_22;
import X6FRs_4.KNBe_11.IFxWkV_5;
import X6FRs_4.KNBe_11.RfjZ_21;
import X6FRs_4.Mqv2r_3.FSaI4_7;
import X6FRs_4.XnFJ5_9.KQgRr5e_0.Mqv2r_3;
import X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import androidx.core.app.ComponentActivity;
import java.io.FileDescriptor;
import java.io.PrintWriter;
/* loaded from: classes.dex */
public class FragmentActivity extends ComponentActivity implements H5YG8fq_22, KQgRr5e_0.QxJ9d_1, KQgRr5e_0.Mqv2r_3 {

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public boolean f3525IFxWkV_5;

    /* renamed from: IMuAHx_6  reason: collision with root package name */
    public boolean f3526IMuAHx_6;
    public int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public RfjZ_21 f2332KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public FSaI4_7<String> f2333KQgRr5e_0;
    public boolean PGPF6hQ_2;
    public boolean QxJ9d_1;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public boolean f3528X6FRs_4;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Handler f2335KQgRr5e_0 = new KQgRr5e_0();

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Mqv2r_3 f2334KQgRr5e_0 = Mqv2r_3.KQgRr5e_0(new QxJ9d_1());

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public boolean f3527Mqv2r_3 = true;

    /* loaded from: classes.dex */
    public class KQgRr5e_0 extends Handler {
        public KQgRr5e_0() {
        }

        @Override // android.os.Handler
        public void handleMessage(Message message) {
            if (message.what != 2) {
                super.handleMessage(message);
                return;
            }
            FragmentActivity.this.QxJ9d_1();
            FragmentActivity.this.f2334KQgRr5e_0.m618KQgRr5e_0();
        }
    }

    /* loaded from: classes.dex */
    public static final class PGPF6hQ_2 {
        public RfjZ_21 KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public X6FRs_4.XnFJ5_9.KQgRr5e_0.FSaI4_7 f2336KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Object f2337KQgRr5e_0;
    }

    /* loaded from: classes.dex */
    public class QxJ9d_1 extends X6FRs_4<FragmentActivity> {
        public QxJ9d_1() {
            super(FragmentActivity.this);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public boolean QxJ9d_1() {
            return FragmentActivity.this.getWindow() != null;
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public void KQgRr5e_0(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
            FragmentActivity.this.dump(str, fileDescriptor, printWriter, strArr);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public boolean KQgRr5e_0(Fragment fragment) {
            return !FragmentActivity.this.isFinishing();
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4, X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public LayoutInflater KQgRr5e_0() {
            return FragmentActivity.this.getLayoutInflater().cloneInContext(FragmentActivity.this);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4, X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public FragmentActivity KQgRr5e_0() {
            return FragmentActivity.this;
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4, X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public void KQgRr5e_0() {
            FragmentActivity.this.supportInvalidateOptionsMenu();
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public void KQgRr5e_0(Fragment fragment, Intent intent, int i, Bundle bundle) {
            FragmentActivity.this.startActivityFromFragment(fragment, intent, i, bundle);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public void KQgRr5e_0(Fragment fragment, IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4, Bundle bundle) throws IntentSender.SendIntentException {
            FragmentActivity.this.startIntentSenderFromFragment(fragment, intentSender, i, intent, i2, i3, i4, bundle);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public void KQgRr5e_0(Fragment fragment, String[] strArr, int i) {
            FragmentActivity.this.KQgRr5e_0(fragment, strArr, i);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public boolean KQgRr5e_0(String str) {
            return X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0((Activity) FragmentActivity.this, str);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4, X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public int KQgRr5e_0() {
            Window window = FragmentActivity.this.getWindow();
            if (window == null) {
                return 0;
            }
            return window.getAttributes().windowAnimations;
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4
        public void KQgRr5e_0(Fragment fragment) {
            FragmentActivity.this.onAttachFragment(fragment);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public View KQgRr5e_0(int i) {
            return FragmentActivity.this.findViewById(i);
        }

        @Override // X6FRs_4.XnFJ5_9.KQgRr5e_0.X6FRs_4, X6FRs_4.XnFJ5_9.KQgRr5e_0.PGPF6hQ_2
        public boolean KQgRr5e_0() {
            Window window = FragmentActivity.this.getWindow();
            return (window == null || window.peekDecorView() == null) ? false : true;
        }
    }

    public final View KQgRr5e_0(View view, String str, Context context, AttributeSet attributeSet) {
        return this.f2334KQgRr5e_0.KQgRr5e_0(view, str, context, attributeSet);
    }

    public void QxJ9d_1() {
        this.f2334KQgRr5e_0.IFxWkV_5();
    }

    @Override // android.app.Activity
    public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        super.dump(str, fileDescriptor, printWriter, strArr);
        printWriter.print(str);
        printWriter.print("Local FragmentActivity ");
        printWriter.print(Integer.toHexString(System.identityHashCode(this)));
        printWriter.println(" State:");
        String str2 = str + "  ";
        printWriter.print(str2);
        printWriter.print("mCreated=");
        printWriter.print(this.QxJ9d_1);
        printWriter.print(" mResumed=");
        printWriter.print(this.PGPF6hQ_2);
        printWriter.print(" mStopped=");
        printWriter.print(this.f3527Mqv2r_3);
        if (getApplication() != null) {
            X6FRs_4.EuDEkJe_12.KQgRr5e_0.KQgRr5e_0.KQgRr5e_0(this).KQgRr5e_0(str2, fileDescriptor, printWriter, strArr);
        }
        this.f2334KQgRr5e_0.m615KQgRr5e_0().KQgRr5e_0(str, fileDescriptor, printWriter, strArr);
    }

    public Object getLastCustomNonConfigurationInstance() {
        PGPF6hQ_2 pGPF6hQ_2 = (PGPF6hQ_2) getLastNonConfigurationInstance();
        if (pGPF6hQ_2 != null) {
            return pGPF6hQ_2.f2337KQgRr5e_0;
        }
        return null;
    }

    @Override // androidx.core.app.ComponentActivity, X6FRs_4.KNBe_11.Xgtqvk_8
    public IFxWkV_5 getLifecycle() {
        return super.getLifecycle();
    }

    public X6FRs_4.XnFJ5_9.KQgRr5e_0.IFxWkV_5 getSupportFragmentManager() {
        return this.f2334KQgRr5e_0.m615KQgRr5e_0();
    }

    @Deprecated
    public X6FRs_4.EuDEkJe_12.KQgRr5e_0.KQgRr5e_0 getSupportLoaderManager() {
        return X6FRs_4.EuDEkJe_12.KQgRr5e_0.KQgRr5e_0.KQgRr5e_0(this);
    }

    @Override // X6FRs_4.KNBe_11.H5YG8fq_22
    public RfjZ_21 getViewModelStore() {
        if (getApplication() != null) {
            if (this.f2332KQgRr5e_0 == null) {
                PGPF6hQ_2 pGPF6hQ_2 = (PGPF6hQ_2) getLastNonConfigurationInstance();
                if (pGPF6hQ_2 != null) {
                    this.f2332KQgRr5e_0 = pGPF6hQ_2.KQgRr5e_0;
                }
                if (this.f2332KQgRr5e_0 == null) {
                    this.f2332KQgRr5e_0 = new RfjZ_21();
                }
            }
            return this.f2332KQgRr5e_0;
        }
        throw new IllegalStateException("Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.");
    }

    @Override // android.app.Activity
    public void onActivityResult(int i, int i2, Intent intent) {
        this.f2334KQgRr5e_0.Xgtqvk_8();
        int i3 = i >> 16;
        if (i3 != 0) {
            int i4 = i3 - 1;
            String m490KQgRr5e_0 = this.f2333KQgRr5e_0.m490KQgRr5e_0(i4);
            this.f2333KQgRr5e_0.m495QxJ9d_1(i4);
            if (m490KQgRr5e_0 == null) {
                Log.w("FragmentActivity", "Activity result delivered for unknown Fragment.");
                return;
            }
            Fragment KQgRr5e_02 = this.f2334KQgRr5e_0.KQgRr5e_0(m490KQgRr5e_0);
            if (KQgRr5e_02 == null) {
                Log.w("FragmentActivity", "Activity result no fragment exists for who: " + m490KQgRr5e_0);
                return;
            }
            KQgRr5e_02.onActivityResult(i & 65535, i2, intent);
            return;
        }
        KQgRr5e_0.PGPF6hQ_2 KQgRr5e_03 = X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0();
        if (KQgRr5e_03 == null || !KQgRr5e_03.KQgRr5e_0(this, i, i2, intent)) {
            super.onActivityResult(i, i2, intent);
        }
    }

    public void onAttachFragment(Fragment fragment) {
    }

    @Override // android.app.Activity
    public void onBackPressed() {
        X6FRs_4.XnFJ5_9.KQgRr5e_0.IFxWkV_5 m615KQgRr5e_0 = this.f2334KQgRr5e_0.m615KQgRr5e_0();
        boolean QxJ9d_12 = m615KQgRr5e_0.QxJ9d_1();
        if (!QxJ9d_12 || Build.VERSION.SDK_INT > 25) {
            if (QxJ9d_12 || !m615KQgRr5e_0.PGPF6hQ_2()) {
                super.onBackPressed();
            }
        }
    }

    @Override // android.app.Activity, android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        this.f2334KQgRr5e_0.Xgtqvk_8();
        this.f2334KQgRr5e_0.KQgRr5e_0(configuration);
    }

    @Override // androidx.core.app.ComponentActivity, android.app.Activity
    public void onCreate(Bundle bundle) {
        RfjZ_21 rfjZ_21;
        this.f2334KQgRr5e_0.KQgRr5e_0((Fragment) null);
        super.onCreate(bundle);
        PGPF6hQ_2 pGPF6hQ_2 = (PGPF6hQ_2) getLastNonConfigurationInstance();
        if (pGPF6hQ_2 != null && (rfjZ_21 = pGPF6hQ_2.KQgRr5e_0) != null && this.f2332KQgRr5e_0 == null) {
            this.f2332KQgRr5e_0 = rfjZ_21;
        }
        if (bundle != null) {
            this.f2334KQgRr5e_0.KQgRr5e_0(bundle.getParcelable("android:support:fragments"), pGPF6hQ_2 != null ? pGPF6hQ_2.f2336KQgRr5e_0 : null);
            if (bundle.containsKey("android:support:next_request_index")) {
                this.KQgRr5e_0 = bundle.getInt("android:support:next_request_index");
                int[] intArray = bundle.getIntArray("android:support:request_indicies");
                String[] stringArray = bundle.getStringArray("android:support:request_fragment_who");
                if (intArray != null && stringArray != null && intArray.length == stringArray.length) {
                    this.f2333KQgRr5e_0 = new FSaI4_7<>(intArray.length);
                    for (int i = 0; i < intArray.length; i++) {
                        this.f2333KQgRr5e_0.QxJ9d_1(intArray[i], stringArray[i]);
                    }
                } else {
                    Log.w("FragmentActivity", "Invalid requestCode mapping in savedInstanceState.");
                }
            }
        }
        if (this.f2333KQgRr5e_0 == null) {
            this.f2333KQgRr5e_0 = new FSaI4_7<>();
            this.KQgRr5e_0 = 0;
        }
        this.f2334KQgRr5e_0.QxJ9d_1();
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public boolean onCreatePanelMenu(int i, Menu menu) {
        if (i == 0) {
            return super.onCreatePanelMenu(i, menu) | this.f2334KQgRr5e_0.KQgRr5e_0(menu, getMenuInflater());
        }
        return super.onCreatePanelMenu(i, menu);
    }

    @Override // android.app.Activity, android.view.LayoutInflater.Factory2
    public View onCreateView(View view, String str, Context context, AttributeSet attributeSet) {
        View KQgRr5e_02 = KQgRr5e_0(view, str, context, attributeSet);
        return KQgRr5e_02 == null ? super.onCreateView(view, str, context, attributeSet) : KQgRr5e_02;
    }

    @Override // android.app.Activity
    public void onDestroy() {
        super.onDestroy();
        if (this.f2332KQgRr5e_0 != null && !isChangingConfigurations()) {
            this.f2332KQgRr5e_0.KQgRr5e_0();
        }
        this.f2334KQgRr5e_0.PGPF6hQ_2();
    }

    @Override // android.app.Activity, android.content.ComponentCallbacks
    public void onLowMemory() {
        super.onLowMemory();
        this.f2334KQgRr5e_0.Mqv2r_3();
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public boolean onMenuItemSelected(int i, MenuItem menuItem) {
        if (super.onMenuItemSelected(i, menuItem)) {
            return true;
        }
        if (i != 0) {
            if (i != 6) {
                return false;
            }
            return this.f2334KQgRr5e_0.KQgRr5e_0(menuItem);
        }
        return this.f2334KQgRr5e_0.QxJ9d_1(menuItem);
    }

    @Override // android.app.Activity
    public void onMultiWindowModeChanged(boolean z) {
        this.f2334KQgRr5e_0.KQgRr5e_0(z);
    }

    @Override // android.app.Activity
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        this.f2334KQgRr5e_0.Xgtqvk_8();
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public void onPanelClosed(int i, Menu menu) {
        if (i == 0) {
            this.f2334KQgRr5e_0.KQgRr5e_0(menu);
        }
        super.onPanelClosed(i, menu);
    }

    @Override // android.app.Activity
    public void onPause() {
        super.onPause();
        this.PGPF6hQ_2 = false;
        if (this.f2335KQgRr5e_0.hasMessages(2)) {
            this.f2335KQgRr5e_0.removeMessages(2);
            QxJ9d_1();
        }
        this.f2334KQgRr5e_0.X6FRs_4();
    }

    @Override // android.app.Activity
    public void onPictureInPictureModeChanged(boolean z) {
        this.f2334KQgRr5e_0.QxJ9d_1(z);
    }

    @Override // android.app.Activity
    public void onPostResume() {
        super.onPostResume();
        this.f2335KQgRr5e_0.removeMessages(2);
        QxJ9d_1();
        this.f2334KQgRr5e_0.m618KQgRr5e_0();
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public boolean onPreparePanel(int i, View view, Menu menu) {
        if (i == 0 && menu != null) {
            return KQgRr5e_0(view, menu) | this.f2334KQgRr5e_0.m619KQgRr5e_0(menu);
        }
        return super.onPreparePanel(i, view, menu);
    }

    @Override // android.app.Activity, X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.QxJ9d_1
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        this.f2334KQgRr5e_0.Xgtqvk_8();
        int i2 = (i >> 16) & 65535;
        if (i2 != 0) {
            int i3 = i2 - 1;
            String m490KQgRr5e_0 = this.f2333KQgRr5e_0.m490KQgRr5e_0(i3);
            this.f2333KQgRr5e_0.m495QxJ9d_1(i3);
            if (m490KQgRr5e_0 == null) {
                Log.w("FragmentActivity", "Activity result delivered for unknown Fragment.");
                return;
            }
            Fragment KQgRr5e_02 = this.f2334KQgRr5e_0.KQgRr5e_0(m490KQgRr5e_0);
            if (KQgRr5e_02 == null) {
                Log.w("FragmentActivity", "Activity result no fragment exists for who: " + m490KQgRr5e_0);
                return;
            }
            KQgRr5e_02.onRequestPermissionsResult(i & 65535, strArr, iArr);
        }
    }

    @Override // android.app.Activity
    public void onResume() {
        super.onResume();
        this.f2335KQgRr5e_0.sendEmptyMessage(2);
        this.PGPF6hQ_2 = true;
        this.f2334KQgRr5e_0.m618KQgRr5e_0();
    }

    public Object onRetainCustomNonConfigurationInstance() {
        return null;
    }

    @Override // android.app.Activity
    public final Object onRetainNonConfigurationInstance() {
        Object onRetainCustomNonConfigurationInstance = onRetainCustomNonConfigurationInstance();
        X6FRs_4.XnFJ5_9.KQgRr5e_0.FSaI4_7 KQgRr5e_02 = this.f2334KQgRr5e_0.KQgRr5e_0();
        if (KQgRr5e_02 == null && this.f2332KQgRr5e_0 == null && onRetainCustomNonConfigurationInstance == null) {
            return null;
        }
        PGPF6hQ_2 pGPF6hQ_2 = new PGPF6hQ_2();
        pGPF6hQ_2.f2337KQgRr5e_0 = onRetainCustomNonConfigurationInstance;
        pGPF6hQ_2.KQgRr5e_0 = this.f2332KQgRr5e_0;
        pGPF6hQ_2.f2336KQgRr5e_0 = KQgRr5e_02;
        return pGPF6hQ_2;
    }

    @Override // androidx.core.app.ComponentActivity, android.app.Activity
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        KQgRr5e_0();
        Parcelable m616KQgRr5e_0 = this.f2334KQgRr5e_0.m616KQgRr5e_0();
        if (m616KQgRr5e_0 != null) {
            bundle.putParcelable("android:support:fragments", m616KQgRr5e_0);
        }
        if (this.f2333KQgRr5e_0.KQgRr5e_0() > 0) {
            bundle.putInt("android:support:next_request_index", this.KQgRr5e_0);
            int[] iArr = new int[this.f2333KQgRr5e_0.KQgRr5e_0()];
            String[] strArr = new String[this.f2333KQgRr5e_0.KQgRr5e_0()];
            for (int i = 0; i < this.f2333KQgRr5e_0.KQgRr5e_0(); i++) {
                iArr[i] = this.f2333KQgRr5e_0.QxJ9d_1(i);
                strArr[i] = this.f2333KQgRr5e_0.m494QxJ9d_1(i);
            }
            bundle.putIntArray("android:support:request_indicies", iArr);
            bundle.putStringArray("android:support:request_fragment_who", strArr);
        }
    }

    @Override // android.app.Activity
    public void onStart() {
        super.onStart();
        this.f3527Mqv2r_3 = false;
        if (!this.QxJ9d_1) {
            this.QxJ9d_1 = true;
            this.f2334KQgRr5e_0.m617KQgRr5e_0();
        }
        this.f2334KQgRr5e_0.Xgtqvk_8();
        this.f2334KQgRr5e_0.m618KQgRr5e_0();
        this.f2334KQgRr5e_0.IMuAHx_6();
    }

    @Override // android.app.Activity
    public void onStateNotSaved() {
        this.f2334KQgRr5e_0.Xgtqvk_8();
    }

    @Override // android.app.Activity
    public void onStop() {
        super.onStop();
        this.f3527Mqv2r_3 = true;
        KQgRr5e_0();
        this.f2334KQgRr5e_0.FSaI4_7();
    }

    public void setEnterSharedElementCallback(XnFJ5_9 xnFJ5_9) {
        X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, xnFJ5_9);
    }

    public void setExitSharedElementCallback(XnFJ5_9 xnFJ5_9) {
        X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.QxJ9d_1(this, xnFJ5_9);
    }

    @Override // android.app.Activity
    public void startActivityForResult(Intent intent, int i) {
        if (!this.f3526IMuAHx_6 && i != -1) {
            KQgRr5e_0(i);
        }
        super.startActivityForResult(intent, i);
    }

    public void startActivityFromFragment(Fragment fragment, Intent intent, int i) {
        startActivityFromFragment(fragment, intent, i, (Bundle) null);
    }

    @Override // android.app.Activity
    public void startIntentSenderForResult(IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4) throws IntentSender.SendIntentException {
        if (!this.f3525IFxWkV_5 && i != -1) {
            KQgRr5e_0(i);
        }
        super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4);
    }

    public void startIntentSenderFromFragment(Fragment fragment, IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4, Bundle bundle) throws IntentSender.SendIntentException {
        this.f3525IFxWkV_5 = true;
        try {
            if (i == -1) {
                X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, intentSender, i, intent, i2, i3, i4, bundle);
                return;
            }
            KQgRr5e_0(i);
            X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, intentSender, ((KQgRr5e_0(fragment) + 1) << 16) + (i & 65535), intent, i2, i3, i4, bundle);
        } finally {
            this.f3525IFxWkV_5 = false;
        }
    }

    public void supportFinishAfterTransition() {
        X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.QxJ9d_1(this);
    }

    @Deprecated
    public void supportInvalidateOptionsMenu() {
        invalidateOptionsMenu();
    }

    public void supportPostponeEnterTransition() {
        X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.PGPF6hQ_2(this);
    }

    public void supportStartPostponedEnterTransition() {
        X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.Mqv2r_3(this);
    }

    @Override // X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.Mqv2r_3
    public final void validateRequestPermissionsRequestCode(int i) {
        if (this.f3528X6FRs_4 || i == -1) {
            return;
        }
        KQgRr5e_0(i);
    }

    public boolean KQgRr5e_0(View view, Menu menu) {
        return super.onPreparePanel(0, view, menu);
    }

    public void startActivityFromFragment(Fragment fragment, Intent intent, int i, Bundle bundle) {
        this.f3526IMuAHx_6 = true;
        try {
            if (i == -1) {
                X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, intent, -1, bundle);
                return;
            }
            KQgRr5e_0(i);
            X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, intent, ((KQgRr5e_0(fragment) + 1) << 16) + (i & 65535), bundle);
        } finally {
            this.f3526IMuAHx_6 = false;
        }
    }

    public static void KQgRr5e_0(int i) {
        if ((i & (-65536)) != 0) {
            throw new IllegalArgumentException("Can only use lower 16 bits for requestCode");
        }
    }

    @Override // android.app.Activity, android.view.LayoutInflater.Factory
    public View onCreateView(String str, Context context, AttributeSet attributeSet) {
        View KQgRr5e_02 = KQgRr5e_0(null, str, context, attributeSet);
        return KQgRr5e_02 == null ? super.onCreateView(str, context, attributeSet) : KQgRr5e_02;
    }

    public final int KQgRr5e_0(Fragment fragment) {
        if (this.f2333KQgRr5e_0.KQgRr5e_0() < 65534) {
            while (this.f2333KQgRr5e_0.KQgRr5e_0(this.KQgRr5e_0) >= 0) {
                this.KQgRr5e_0 = (this.KQgRr5e_0 + 1) % 65534;
            }
            int i = this.KQgRr5e_0;
            this.f2333KQgRr5e_0.QxJ9d_1(i, fragment.mWho);
            this.KQgRr5e_0 = (this.KQgRr5e_0 + 1) % 65534;
            return i;
        }
        throw new IllegalStateException("Too many pending Fragment activity results.");
    }

    @Override // android.app.Activity
    public void startActivityForResult(Intent intent, int i, Bundle bundle) {
        if (!this.f3526IMuAHx_6 && i != -1) {
            KQgRr5e_0(i);
        }
        super.startActivityForResult(intent, i, bundle);
    }

    @Override // android.app.Activity
    public void startIntentSenderForResult(IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4, Bundle bundle) throws IntentSender.SendIntentException {
        if (!this.f3525IFxWkV_5 && i != -1) {
            KQgRr5e_0(i);
        }
        super.startIntentSenderForResult(intentSender, i, intent, i2, i3, i4, bundle);
    }

    public void KQgRr5e_0(Fragment fragment, String[] strArr, int i) {
        if (i == -1) {
            X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, strArr, i);
            return;
        }
        KQgRr5e_0(i);
        try {
            this.f3528X6FRs_4 = true;
            X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(this, strArr, ((KQgRr5e_0(fragment) + 1) << 16) + (i & 65535));
        } finally {
            this.f3528X6FRs_4 = false;
        }
    }

    public final void KQgRr5e_0() {
        do {
        } while (KQgRr5e_0(getSupportFragmentManager(), IFxWkV_5.QxJ9d_1.CREATED));
    }

    public static boolean KQgRr5e_0(X6FRs_4.XnFJ5_9.KQgRr5e_0.IFxWkV_5 iFxWkV_5, IFxWkV_5.QxJ9d_1 qxJ9d_1) {
        boolean z = false;
        for (Fragment fragment : iFxWkV_5.m598KQgRr5e_0()) {
            if (fragment != null) {
                if (fragment.getLifecycle().KQgRr5e_0().KQgRr5e_0(IFxWkV_5.QxJ9d_1.STARTED)) {
                    fragment.mLifecycleRegistry.m362KQgRr5e_0(qxJ9d_1);
                    z = true;
                }
                X6FRs_4.XnFJ5_9.KQgRr5e_0.IFxWkV_5 peekChildFragmentManager = fragment.peekChildFragmentManager();
                if (peekChildFragmentManager != null) {
                    z |= KQgRr5e_0(peekChildFragmentManager, qxJ9d_1);
                }
            }
        }
        return z;
    }
}
