package ῲ.ῲ.K;

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.R$attr;
import androidx.appcompat.app.AppCompatDelegateImpl;
import ῲ.ᨨ.ᨨ.C1773;
import ῲ.ῲ.ඓ.AbstractC1890;

/* renamed from: ῲ.ῲ.K.ݜ  reason: contains not printable characters */
/* compiled from: AppCompatDialog */
public class DialogC1947 extends Dialog implements AbstractC1967 {
    public AbstractC1983 mDelegate;
    public final C1773.AbstractC1774 mKeyDispatcher;

    /* renamed from: ῲ.ῲ.K.ݜ$K  reason: contains not printable characters */
    /* compiled from: AppCompatDialog */
    public class C1948 implements C1773.AbstractC1774 {
        public C1948() {
        }

        @Override // ῲ.ᨨ.ᨨ.C1773.AbstractC1774
        public boolean superDispatchKeyEvent(KeyEvent keyEvent) {
            return DialogC1947.this.superDispatchKeyEvent(keyEvent);
        }
    }

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

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

    public void addContentView(View view, ViewGroup.LayoutParams layoutParams) {
        getDelegate().m5133(view, layoutParams);
    }

    public void dismiss() {
        super.dismiss();
        getDelegate().m5125();
    }

    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        return C1773.m4623(this.mKeyDispatcher, getWindow().getDecorView(), this, keyEvent);
    }

    @Override // android.app.Dialog
    public <T extends View> T findViewById(int i) {
        AppCompatDelegateImpl appCompatDelegateImpl = (AppCompatDelegateImpl) getDelegate();
        appCompatDelegateImpl.m156();
        return (T) appCompatDelegateImpl.f280.findViewById(i);
    }

    public AbstractC1983 getDelegate() {
        if (this.mDelegate == null) {
            this.mDelegate = AbstractC1983.m5123(this, this);
        }
        return this.mDelegate;
    }

    public AbstractC1963 getSupportActionBar() {
        AppCompatDelegateImpl appCompatDelegateImpl = (AppCompatDelegateImpl) getDelegate();
        appCompatDelegateImpl.m178();
        return appCompatDelegateImpl.f262;
    }

    public void invalidateOptionsMenu() {
        getDelegate().m5126();
    }

    public void onCreate(Bundle bundle) {
        getDelegate().m5130();
        super.onCreate(bundle);
        getDelegate().m5131(bundle);
    }

    public void onStop() {
        super.onStop();
        AppCompatDelegateImpl appCompatDelegateImpl = (AppCompatDelegateImpl) getDelegate();
        appCompatDelegateImpl.f254 = false;
        appCompatDelegateImpl.m178();
        AbstractC1963 k = appCompatDelegateImpl.f262;
        if (k != null) {
            k.m5086(false);
        }
    }

    @Override // ῲ.ῲ.K.AbstractC1967
    public void onSupportActionModeFinished(AbstractC1890 r1) {
    }

    @Override // ῲ.ῲ.K.AbstractC1967
    public void onSupportActionModeStarted(AbstractC1890 r1) {
    }

    @Override // ῲ.ῲ.K.AbstractC1967
    public AbstractC1890 onWindowStartingSupportActionMode(AbstractC1890.AbstractC1891 k) {
        return null;
    }

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

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

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

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

    public DialogC1947(Context context, int i) {
        super(context, getThemeResId(context, i));
        this.mKeyDispatcher = new C1948();
        AbstractC1983 delegate = getDelegate();
        ((AppCompatDelegateImpl) delegate).f282 = getThemeResId(context, i);
        delegate.m5131((Bundle) null);
    }

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

    public void setContentView(View view, ViewGroup.LayoutParams layoutParams) {
        getDelegate().m5129(view, layoutParams);
    }

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

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