package X6FRs_4.KQgRr5e_0.Nm6q_10;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.Mqv2r_3;
import X6FRs_4.KQgRr5e_0.YghfZG_14.QxJ9d_1;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.app.ActionBar;
/* compiled from: AppCompatDialog.java */
/* loaded from: classes.dex */
public class X6FRs_4 extends Dialog implements PGPF6hQ_2 {
    public Mqv2r_3 mDelegate;
    public final Mqv2r_3.KQgRr5e_0 mKeyDispatcher;

    /* compiled from: AppCompatDialog.java */
    /* loaded from: classes.dex */
    public class KQgRr5e_0 implements Mqv2r_3.KQgRr5e_0 {
        public KQgRr5e_0() {
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.Mqv2r_3.KQgRr5e_0
        public boolean superDispatchKeyEvent(KeyEvent keyEvent) {
            return X6FRs_4.this.superDispatchKeyEvent(keyEvent);
        }
    }

    public X6FRs_4(Context context) {
        this(context, 0);
    }

    public static int getThemeResId(Context context, int i) {
        if (i == 0) {
            TypedValue typedValue = new TypedValue();
            context.getTheme().resolveAttribute(X6FRs_4.KQgRr5e_0.KQgRr5e_0.dialogTheme, typedValue, true);
            return typedValue.resourceId;
        }
        return i;
    }

    @Override // android.app.Dialog
    public void addContentView(View view, ViewGroup.LayoutParams layoutParams) {
        getDelegate().KQgRr5e_0(view, layoutParams);
    }

    @Override // android.app.Dialog, android.view.Window.Callback
    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        return X6FRs_4.IMuAHx_6.EuDEkJe_12.Mqv2r_3.KQgRr5e_0(this.mKeyDispatcher, getWindow().getDecorView(), this, keyEvent);
    }

    @Override // android.app.Dialog
    public <T extends View> T findViewById(int i) {
        return (T) getDelegate().KQgRr5e_0(i);
    }

    public Mqv2r_3 getDelegate() {
        if (this.mDelegate == null) {
            this.mDelegate = Mqv2r_3.KQgRr5e_0(this, this);
        }
        return this.mDelegate;
    }

    public ActionBar getSupportActionBar() {
        return getDelegate().m450KQgRr5e_0();
    }

    @Override // android.app.Dialog
    public void invalidateOptionsMenu() {
        getDelegate().QxJ9d_1();
    }

    @Override // android.app.Dialog
    public void onCreate(Bundle bundle) {
        getDelegate().m451KQgRr5e_0();
        super.onCreate(bundle);
        getDelegate().KQgRr5e_0(bundle);
    }

    @Override // android.app.Dialog
    public void onStop() {
        super.onStop();
        getDelegate().IFxWkV_5();
    }

    @Override // X6FRs_4.KQgRr5e_0.Nm6q_10.PGPF6hQ_2
    public void onSupportActionModeFinished(X6FRs_4.KQgRr5e_0.YghfZG_14.QxJ9d_1 qxJ9d_1) {
    }

    @Override // X6FRs_4.KQgRr5e_0.Nm6q_10.PGPF6hQ_2
    public void onSupportActionModeStarted(X6FRs_4.KQgRr5e_0.YghfZG_14.QxJ9d_1 qxJ9d_1) {
    }

    @Override // X6FRs_4.KQgRr5e_0.Nm6q_10.PGPF6hQ_2
    public X6FRs_4.KQgRr5e_0.YghfZG_14.QxJ9d_1 onWindowStartingSupportActionMode(QxJ9d_1.KQgRr5e_0 kQgRr5e_0) {
        return null;
    }

    @Override // android.app.Dialog
    public void setContentView(int i) {
        getDelegate().m452KQgRr5e_0(i);
    }

    @Override // android.app.Dialog
    public void setTitle(CharSequence charSequence) {
        super.setTitle(charSequence);
        getDelegate().KQgRr5e_0(charSequence);
    }

    public boolean superDispatchKeyEvent(KeyEvent keyEvent) {
        return super.dispatchKeyEvent(keyEvent);
    }

    public boolean supportRequestWindowFeature(int i) {
        return getDelegate().m454KQgRr5e_0(i);
    }

    public X6FRs_4(Context context, int i) {
        super(context, getThemeResId(context, i));
        this.mKeyDispatcher = new KQgRr5e_0();
        getDelegate().KQgRr5e_0((Bundle) null);
        getDelegate().m453KQgRr5e_0();
    }

    @Override // android.app.Dialog
    public void setContentView(View view) {
        getDelegate().KQgRr5e_0(view);
    }

    @Override // android.app.Dialog
    public void setContentView(View view, ViewGroup.LayoutParams layoutParams) {
        getDelegate().QxJ9d_1(view, layoutParams);
    }

    @Override // android.app.Dialog
    public void setTitle(int i) {
        super.setTitle(i);
        getDelegate().KQgRr5e_0(getContext().getString(i));
    }

    public X6FRs_4(Context context, boolean z, DialogInterface.OnCancelListener onCancelListener) {
        super(context, z, onCancelListener);
        this.mKeyDispatcher = new KQgRr5e_0();
    }
}
