content: package androidx.appcompat.app;
  
  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.activity.ComponentDialog;
  import androidx.appcompat.R;
  import androidx.appcompat.view.ActionMode;
  import androidx.core.view.KeyEventDispatcher;
  
  public class AppCompatDialog extends ComponentDialog implements AppCompatCallback {
      private AppCompatDelegate mDelegate;
      private final KeyEventDispatcher.Component mKeyDispatcher;
  
      public AppCompatDialog(Context context) {
          this(context, 0);
      }
  
      public AppCompatDialog(Context context, int theme) {
          super(context, getThemeResId(context, theme));
          this.mKeyDispatcher = new AppCompatDialog$$ExternalSyntheticLambda0(this);
          AppCompatDelegate delegate = getDelegate();
          delegate.setTheme(getThemeResId(context, theme));
          delegate.onCreate((Bundle) null);
      }
  
      protected AppCompatDialog(Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener) {
          super(context);
          this.mKeyDispatcher = new AppCompatDialog$$ExternalSyntheticLambda0(this);
          setCancelable(cancelable);
          setOnCancelListener(cancelListener);
      }
  
      private static int getThemeResId(Context context, int themeId) {
          if (themeId != 0) {
              return themeId;
          }
          TypedValue typedValue = new TypedValue();
          context.getTheme().resolveAttribute(R.attr.dialogTheme, typedValue, true);
          return typedValue.resourceId;
      }
  
      public void addContentView(View view, ViewGroup.LayoutParams params) {
          getDelegate().addContentView(view, params);
      }
  
      public void dismiss() {
          super.dismiss();
          getDelegate().onDestroy();
      }
  
      public boolean dispatchKeyEvent(KeyEvent event) {
          return KeyEventDispatcher.dispatchKeyEvent(this.mKeyDispatcher, getWindow().getDecorView(), this, event);
      }
  
      public <T extends View> T findViewById(int id) {
          return getDelegate().findViewById(id);
      }
  
      public AppCompatDelegate getDelegate() {
          if (this.mDelegate == null) {
              this.mDelegate = AppCompatDelegate.create((Dialog) this, (AppCompatCallback) this);
          }
          return this.mDelegate;
      }
  
      public ActionBar getSupportActionBar() {
          return getDelegate().getSupportActionBar();
      }
  
      public void invalidateOptionsMenu() {
          getDelegate().invalidateOptionsMenu();
      }
  
      /* access modifiers changed from: protected */
      public void onCreate(Bundle savedInstanceState) {
          getDelegate().installViewFactory();
          super.onCreate(savedInstanceState);
          getDelegate().onCreate(savedInstanceState);
      }
  
      /* access modifiers changed from: protected */
      public void onStop() {
          super.onStop();
          getDelegate().onStop();
      }
  
      public void onSupportActionModeFinished(ActionMode mode) {
      }
  
      public void onSupportActionModeStarted(ActionMode mode) {
      }
  
      public ActionMode onWindowStartingSupportActionMode(ActionMode.Callback callback) {
          return null;
      }
  
      public void setContentView(int layoutResID) {
          getDelegate().setContentView(layoutResID);
      }
  
      public void setContentView(View view) {
          getDelegate().setContentView(view);
      }
  
      public void setContentView(View view, ViewGroup.LayoutParams params) {
          getDelegate().setContentView(view, params);
      }
  
      public void setTitle(int titleId) {
          super.setTitle(titleId);
          getDelegate().setTitle(getContext().getString(titleId));
      }
  
      public void setTitle(CharSequence title) {
          super.setTitle(title);
          getDelegate().setTitle(title);
      }
  
      /* access modifiers changed from: package-private */
      public boolean superDispatchKeyEvent(KeyEvent event) {
          return super.dispatchKeyEvent(event);
      }
  
      public boolean supportRequestWindowFeature(int featureId) {
          return getDelegate().requestWindowFeature(featureId);
      }
  }
  