package p000.p001.p002.p008.p009;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import p000.p001.p021.p022.C1219;
import p037.p065.p068.C1850;
import p037.p089.p090.ActivityC1999;
import p037.p089.p090.DialogInterfaceOnCancelListenerC1992;
import p402.InterfaceC6540;
import p402.p411.p413.C6635;

/* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ނ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public class C0775 extends DialogInterfaceOnCancelListenerC1992 {

    /* JADX INFO: renamed from: ނ.֏.֏.ހ.֏.ނ$֏, reason: contains not printable characters */
    public static final class DialogInterfaceOnShowListenerC0776 implements DialogInterface.OnShowListener {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final /* synthetic */ Window f3296;

        public DialogInterfaceOnShowListenerC0776(Window window) {
            this.f3296 = window;
        }

        @Override // android.content.DialogInterface.OnShowListener
        public final void onShow(DialogInterface dialogInterface) {
            WindowManager windowManager;
            this.f3296.clearFlags(8);
            try {
                Context context = this.f3296.getContext();
                if (context == null || (windowManager = (WindowManager) C1850.m3648(context, WindowManager.class)) == null) {
                    return;
                }
                windowManager.updateViewLayout(this.f3296.getDecorView(), this.f3296.getAttributes());
            } catch (Exception unused) {
            }
        }
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        Dialog dialog;
        Window window;
        Window window2;
        View decorView;
        if (layoutInflater == null) {
            C6635.m9824("inflater");
            throw null;
        }
        if (Build.VERSION.SDK_INT >= 24 && (dialog = this.f6561) != null && (window = dialog.getWindow()) != null) {
            window.setFlags(8, 8);
            View decorView2 = window.getDecorView();
            C6635.m9823((Object) decorView2, "decorView");
            ActivityC1999 activity = getActivity();
            decorView2.setSystemUiVisibility((activity == null || (window2 = activity.getWindow()) == null || (decorView = window2.getDecorView()) == null) ? 0 : decorView.getSystemUiVisibility());
            Dialog dialog2 = this.f6561;
            if (dialog2 != null) {
                dialog2.setOnShowListener(new DialogInterfaceOnShowListenerC0776(window));
            }
        }
        int i = this.mContentLayoutId;
        if (i != 0) {
            return layoutInflater.inflate(i, viewGroup, false);
        }
        return null;
    }

    @Override // p037.p089.p090.DialogInterfaceOnCancelListenerC1992, androidx.fragment.app.Fragment
    public /* synthetic */ void onDestroyView() {
        super.onDestroyView();
        mo1840();
    }

    @Override // p037.p089.p090.DialogInterfaceOnCancelListenerC1992, android.content.DialogInterface.OnDismissListener
    public void onDismiss(DialogInterface dialogInterface) {
        ActivityC1999 activity;
        if (dialogInterface == null) {
            C6635.m9824("dialog");
            throw null;
        }
        super.onDismiss(dialogInterface);
        if (Build.VERSION.SDK_INT >= 24 || (activity = getActivity()) == null) {
            return;
        }
        C1219.m2474((Activity) activity, true);
    }

    @Override // p037.p089.p090.DialogInterfaceOnCancelListenerC1992, androidx.fragment.app.Fragment
    public void onStart() {
        this.mCalled = true;
        Dialog dialog = this.f6561;
        if (dialog != null) {
            this.f6562 = false;
            dialog.show();
        }
        Dialog dialog2 = this.f6561;
        if (!(dialog2 instanceof AlertDialog)) {
            dialog2 = null;
        }
        AlertDialog alertDialog = (AlertDialog) dialog2;
        if (alertDialog != null) {
            Button button = alertDialog.getButton(-1);
            if (button != null) {
                button.setAllCaps(false);
            }
            Button button2 = alertDialog.getButton(-3);
            if (button2 != null) {
                button2.setAllCaps(false);
            }
            Button button3 = alertDialog.getButton(-2);
            if (button3 != null) {
                button3.setAllCaps(false);
            }
            Button button4 = alertDialog.getButton(-1);
            if (button4 != null) {
                button4.requestFocus();
            }
        }
    }

    /* JADX INFO: renamed from: މ */
    public void mo1840() {
    }
}
