content: package androidx.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.Looper;
  import android.text.TextUtils;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.Window;
  import androidx.activity.contextaware.ContextAware;
  import androidx.activity.contextaware.ContextAwareHelper;
  import androidx.activity.contextaware.OnContextAvailableListener;
  import androidx.activity.result.ActivityResultCallback;
  import androidx.activity.result.ActivityResultCaller;
  import androidx.activity.result.ActivityResultLauncher;
  import androidx.activity.result.ActivityResultRegistry;
  import androidx.activity.result.ActivityResultRegistryOwner;
  import androidx.activity.result.IntentSenderRequest;
  import androidx.activity.result.contract.ActivityResultContract;
  import androidx.activity.result.contract.ActivityResultContracts;
  import androidx.core.app.ActivityCompat;
  import androidx.core.app.ActivityOptionsCompat;
  import androidx.core.app.MultiWindowModeChangedInfo;
  import androidx.core.app.OnMultiWindowModeChangedProvider;
  import androidx.core.app.OnNewIntentProvider;
  import androidx.core.app.OnPictureInPictureModeChangedProvider;
  import androidx.core.app.PictureInPictureModeChangedInfo;
  import androidx.core.content.ContextCompat;
  import androidx.core.content.OnConfigurationChangedProvider;
  import androidx.core.content.OnTrimMemoryProvider;
  import androidx.core.util.Consumer;
  import androidx.core.view.MenuHost;
  import androidx.core.view.MenuHostHelper;
  import androidx.core.view.MenuProvider;
  import androidx.lifecycle.HasDefaultViewModelProviderFactory;
  import androidx.lifecycle.Lifecycle;
  import androidx.lifecycle.LifecycleEventObserver;
  import androidx.lifecycle.LifecycleOwner;
  import androidx.lifecycle.LifecycleRegistry;
  import androidx.lifecycle.ReportFragment;
  import androidx.lifecycle.SavedStateHandleSupport;
  import androidx.lifecycle.SavedStateViewModelFactory;
  import androidx.lifecycle.ViewModelProvider;
  import androidx.lifecycle.ViewModelStore;
  import androidx.lifecycle.ViewModelStoreOwner;
  import androidx.lifecycle.ViewTreeLifecycleOwner;
  import androidx.lifecycle.ViewTreeViewModelStoreOwner;
  import androidx.lifecycle.viewmodel.CreationExtras;
  import androidx.lifecycle.viewmodel.MutableCreationExtras;
  import androidx.savedstate.SavedStateRegistry;
  import androidx.savedstate.SavedStateRegistryController;
  import androidx.savedstate.SavedStateRegistryOwner;
  import androidx.savedstate.ViewTreeSavedStateRegistryOwner;
  import androidx.tracing.Trace;
  import java.util.Iterator;
  import java.util.concurrent.CopyOnWriteArrayList;
  import java.util.concurrent.atomic.AtomicInteger;
  
  public class ComponentActivity extends androidx.core.app.ComponentActivity implements ContextAware, LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner, OnBackPressedDispatcherOwner, ActivityResultRegistryOwner, ActivityResultCaller, OnConfigurationChangedProvider, OnTrimMemoryProvider, OnNewIntentProvider, OnMultiWindowModeChangedProvider, OnPictureInPictureModeChangedProvider, MenuHost {
      private static final String ACTIVITY_RESULT_TAG = "android:support:activity-result";
      private final ActivityResultRegistry mActivityResultRegistry;
      private int mContentLayoutId;
      final ContextAwareHelper mContextAwareHelper;
      private ViewModelProvider.Factory mDefaultFactory;
      private final LifecycleRegistry mLifecycleRegistry;
      private final MenuHostHelper mMenuHostHelper;
      private final AtomicInteger mNextLocalRequestCode;
      private final OnBackPressedDispatcher mOnBackPressedDispatcher;
      private final CopyOnWriteArrayList<Consumer<Configuration>> mOnConfigurationChangedListeners;
      private final CopyOnWriteArrayList<Consumer<MultiWindowModeChangedInfo>> mOnMultiWindowModeChangedListeners;
      private final CopyOnWriteArrayList<Consumer<Intent>> mOnNewIntentListeners;
      private final CopyOnWriteArrayList<Consumer<PictureInPictureModeChangedInfo>> mOnPictureInPictureModeChangedListeners;
      private final CopyOnWriteArrayList<Consumer<Integer>> mOnTrimMemoryListeners;
      final SavedStateRegistryController mSavedStateRegistryController;
      private ViewModelStore mViewModelStore;
  
      static class Api19Impl {
          private Api19Impl() {
          }
  
          static void cancelPendingInputEvents(View view) {
              view.cancelPendingInputEvents();
          }
      }
  
      static final class NonConfigurationInstances {
          Object custom;
          ViewModelStore viewModelStore;
  
          NonConfigurationInstances() {
          }
      }
  
      public ComponentActivity() {
          this.mContextAwareHelper = new ContextAwareHelper();
          this.mMenuHostHelper = new MenuHostHelper(new ComponentActivity$$ExternalSyntheticLambda0(this));
          this.mLifecycleRegistry = new LifecycleRegistry(this);
          SavedStateRegistryController create = SavedStateRegistryController.create(this);
          this.mSavedStateRegistryController = create;
          this.mOnBackPressedDispatcher = new OnBackPressedDispatcher(new Runnable() {
              public void run() {
                  try {
                      ComponentActivity.super.onBackPressed();
                  } catch (IllegalStateException e) {
                      if (!TextUtils.equals(e.getMessage(), "Can not perform this action after onSaveInstanceState")) {
                          throw e;
                      }
                  }
              }
          });
          this.mNextLocalRequestCode = new AtomicInteger();
          this.mActivityResultRegistry = new ActivityResultRegistry() {
              public <I, O> void onLaunch(int requestCode, ActivityResultContract<I, O> activityResultContract, I i, ActivityOptionsCompat options) {
                  Bundle bundle;
                  Bundle bundle2;
                  final int i2 = requestCode;
                  ActivityResultContract<I, O> activityResultContract2 = activityResultContract;
                  I i3 = i;
                  ComponentActivity componentActivity = ComponentActivity.this;
                  final ActivityResultContract.SynchronousResult<O> synchronousResult = activityResultContract2.getSynchronousResult(componentActivity, i3);
                  if (synchronousResult != null) {
                      new Handler(Looper.getMainLooper()).post(new Runnable() {
                          public void run() {
                              AnonymousClass2.this.dispatchResult(i2, synchronousResult.getValue());
                          }
                      });
                      return;
                  }
                  Intent createIntent = activityResultContract2.createIntent(componentActivity, i3);
                  if (createIntent.getExtras() != null && createIntent.getExtras().getClassLoader() == null) {
                      createIntent.setExtrasClassLoader(componentActivity.getClassLoader());
                  }
                  if (createIntent.hasExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE)) {
                      Bundle bundleExtra = createIntent.getBundleExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
                      createIntent.removeExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
                      bundle = bundleExtra;
                  } else {
                      bundle = options != null ? options.toBundle() : null;
                  }
                  if (ActivityResultContracts.RequestMultiplePermissions.ACTION_REQUEST_PERMISSIONS.equals(createIntent.getAction())) {
                      String[] stringArrayExtra = createIntent.getStringArrayExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS);
                      if (stringArrayExtra == null) {
                          stringArrayExtra = new String[0];
                      }
                      ActivityCompat.requestPermissions(componentActivity, stringArrayExtra, i2);
                      Bundle bundle3 = bundle;
                  } else if (ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST.equals(createIntent.getAction())) {
                      IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_INTENT_SENDER_REQUEST);
                      try {
                          bundle2 = bundle;
                          try {
                              ActivityCompat.startIntentSenderForResult(componentActivity, intentSenderRequest.getIntentSender(), requestCode, intentSenderRequest.getFillInIntent(), intentSenderRequest.getFlagsMask(), intentSenderRequest.getFlagsValues(), 0, bundle2);
                          } catch (IntentSender.SendIntentException e) {
                              e = e;
                          }
                      } catch (IntentSender.SendIntentException e2) {
                          e = e2;
                          bundle2 = bundle;
                          new Handler(Looper.getMainLooper()).post(new Runnable() {
                              public void run() {
                                  AnonymousClass2.this.dispatchResult(i2, 0, new Intent().setAction(ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST).putExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_SEND_INTENT_EXCEPTION, e));
                              }
                          });
                          Bundle bundle4 = bundle2;
                      }
                      Bundle bundle42 = bundle2;
                  } else {
                      ActivityCompat.startActivityForResult(componentActivity, createIntent, i2, bundle);
                  }
              }
          };
          this.mOnConfigurationChangedListeners = new CopyOnWriteArrayList<>();
          this.mOnTrimMemoryListeners = new CopyOnWriteArrayList<>();
          this.mOnNewIntentListeners = new CopyOnWriteArrayList<>();
          this.mOnMultiWindowModeChangedListeners = new CopyOnWriteArrayList<>();
          this.mOnPictureInPictureModeChangedListeners = new CopyOnWriteArrayList<>();
          if (getLifecycle() != null) {
              if (Build.VERSION.SDK_INT >= 19) {
                  getLifecycle().addObserver(new LifecycleEventObserver() {
                      public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
                          if (event == Lifecycle.Event.ON_STOP) {
                              Window window = ComponentActivity.this.getWindow();
                              View peekDecorView = window != null ? window.peekDecorView() : null;
                              if (peekDecorView != null) {
                                  Api19Impl.cancelPendingInputEvents(peekDecorView);
                              }
                          }
                      }
                  });
              }
              getLifecycle().addObserver(new LifecycleEventObserver() {
                  public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
                      if (event == Lifecycle.Event.ON_DESTROY) {
                          ComponentActivity.this.mContextAwareHelper.clearAvailableContext();
                          if (!ComponentActivity.this.isChangingConfigurations()) {
                              ComponentActivity.this.getViewModelStore().clear();
                          }
                      }
                  }
              });
              getLifecycle().addObserver(new LifecycleEventObserver() {
                  public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
                      ComponentActivity.this.ensureViewModelStore();
                      ComponentActivity.this.getLifecycle().removeObserver(this);
                  }
              });
              create.performAttach();
              SavedStateHandleSupport.enableSavedStateHandles(this);
              if (19 <= Build.VERSION.SDK_INT && Build.VERSION.SDK_INT <= 23) {
                  getLifecycle().addObserver(new ImmLeaksCleaner(this));
              }
              getSavedStateRegistry().registerSavedStateProvider(ACTIVITY_RESULT_TAG, new ComponentActivity$$ExternalSyntheticLambda1(this));
              addOnContextAvailableListener(new ComponentActivity$$ExternalSyntheticLambda2(this));
              return;
          }
          throw new IllegalStateException("getLifecycle() returned null in ComponentActivity's constructor. Please make sure you are lazily constructing your Lifecycle in the first call to getLifecycle() rather than relying on field initialization.");
      }
  
      public ComponentActivity(int contentLayoutId) {
          this();
          this.mContentLayoutId = contentLayoutId;
      }
  
      private void initViewTreeOwners() {
          ViewTreeLifecycleOwner.set(getWindow().getDecorView(), this);
          ViewTreeViewModelStoreOwner.set(getWindow().getDecorView(), this);
          ViewTreeSavedStateRegistryOwner.set(getWindow().getDecorView(), this);
          ViewTreeOnBackPressedDispatcherOwner.set(getWindow().getDecorView(), this);
      }
  
      public void addContentView(View view, ViewGroup.LayoutParams params) {
          initViewTreeOwners();
          super.addContentView(view, params);
      }
  
      public void addMenuProvider(MenuProvider provider) {
          this.mMenuHostHelper.addMenuProvider(provider);
      }
  
      public void addMenuProvider(MenuProvider provider, LifecycleOwner owner) {
          this.mMenuHostHelper.addMenuProvider(provider, owner);
      }
  
      public void addMenuProvider(MenuProvider provider, LifecycleOwner owner, Lifecycle.State state) {
          this.mMenuHostHelper.addMenuProvider(provider, owner, state);
      }
  
      public final void addOnConfigurationChangedListener(Consumer<Configuration> consumer) {
          this.mOnConfigurationChangedListeners.add(consumer);
      }
  
      public final void addOnContextAvailableListener(OnContextAvailableListener listener) {
          this.mContextAwareHelper.addOnContextAvailableListener(listener);
      }
  
      public final void addOnMultiWindowModeChangedListener(Consumer<MultiWindowModeChangedInfo> consumer) {
          this.mOnMultiWindowModeChangedListeners.add(consumer);
      }
  
      public final void addOnNewIntentListener(Consumer<Intent> consumer) {
          this.mOnNewIntentListeners.add(consumer);
      }
  
      public final void addOnPictureInPictureModeChangedListener(Consumer<PictureInPictureModeChangedInfo> consumer) {
          this.mOnPictureInPictureModeChangedListeners.add(consumer);
      }
  
      public final void addOnTrimMemoryListener(Consumer<Integer> consumer) {
          this.mOnTrimMemoryListeners.add(consumer);
      }
  
      /* access modifiers changed from: package-private */
      public void ensureViewModelStore() {
          if (this.mViewModelStore == null) {
              NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
              if (nonConfigurationInstances != null) {
                  this.mViewModelStore = nonConfigurationInstances.viewModelStore;
              }
              if (this.mViewModelStore == null) {
                  this.mViewModelStore = new ViewModelStore();
              }
          }
      }
  
      public final ActivityResultRegistry getActivityResultRegistry() {
          return this.mActivityResultRegistry;
      }
  
      public CreationExtras getDefaultViewModelCreationExtras() {
          MutableCreationExtras mutableCreationExtras = new MutableCreationExtras();
          if (getApplication() != null) {
              mutableCreationExtras.set(ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY, getApplication());
          }
          mutableCreationExtras.set(SavedStateHandleSupport.SAVED_STATE_REGISTRY_OWNER_KEY, this);
          mutableCreationExtras.set(SavedStateHandleSupport.VIEW_MODEL_STORE_OWNER_KEY, this);
          if (!(getIntent() == null || getIntent().getExtras() == null)) {
              mutableCreationExtras.set(SavedStateHandleSupport.DEFAULT_ARGS_KEY, getIntent().getExtras());
          }
          return mutableCreationExtras;
      }
  
      public ViewModelProvider.Factory getDefaultViewModelProviderFactory() {
          if (this.mDefaultFactory == null) {
              this.mDefaultFactory = new SavedStateViewModelFactory(getApplication(), this, getIntent() != null ? getIntent().getExtras() : null);
          }
          return this.mDefaultFactory;
      }
  
      @Deprecated
      public Object getLastCustomNonConfigurationInstance() {
          NonConfigurationInstances nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance();
          if (nonConfigurationInstances != null) {
              return nonConfigurationInstances.custom;
          }
          return null;
      }
  
      public Lifecycle getLifecycle() {
          return this.mLifecycleRegistry;
      }
  
      public final OnBackPressedDispatcher getOnBackPressedDispatcher() {
          return this.mOnBackPressedDispatcher;
      }
  
      public final SavedStateRegistry getSavedStateRegistry() {
          return this.mSavedStateRegistryController.getSavedStateRegistry();
      }
  
      public ViewModelStore getViewModelStore() {
          if (getApplication() != null) {
              ensureViewModelStore();
              return this.mViewModelStore;
          }
          throw new IllegalStateException("Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.");
      }
  
      public void invalidateMenu() {
          invalidateOptionsMenu();
      }
  
      /* access modifiers changed from: package-private */
      /* renamed from: lambda$new$0$androidx-activity-ComponentActivity  reason: not valid java name */
      public /* synthetic */ Bundle m0lambda$new$0$androidxactivityComponentActivity() {
          Bundle bundle = new Bundle();
          this.mActivityResultRegistry.onSaveInstanceState(bundle);
          return bundle;
      }
  
      /* access modifiers changed from: package-private */
      /* renamed from: lambda$new$1$androidx-activity-ComponentActivity  reason: not valid java name */
      public /* synthetic */ void m1lambda$new$1$androidxactivityComponentActivity(Context context) {
          Bundle consumeRestoredStateForKey = getSavedStateRegistry().consumeRestoredStateForKey(ACTIVITY_RESULT_TAG);
          if (consumeRestoredStateForKey != null) {
              this.mActivityResultRegistry.onRestoreInstanceState(consumeRestoredStateForKey);
          }
      }
  
      /* access modifiers changed from: protected */
      @Deprecated
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (!this.mActivityResultRegistry.dispatchResult(requestCode, resultCode, data)) {
              super.onActivityResult(requestCode, resultCode, data);
          }
      }
  
      public void onBackPressed() {
          this.mOnBackPressedDispatcher.onBackPressed();
      }
  
      public void onConfigurationChanged(Configuration newConfig) {
          super.onConfigurationChanged(newConfig);
          Iterator<Consumer<Configuration>> it = this.mOnConfigurationChangedListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(newConfig);
          }
      }
  
      /* access modifiers changed from: protected */
      public void onCreate(Bundle savedInstanceState) {
          this.mSavedStateRegistryController.performRestore(savedInstanceState);
          this.mContextAwareHelper.dispatchOnContextAvailable(this);
          super.onCreate(savedInstanceState);
          ReportFragment.injectIfNeededIn(this);
          int i = this.mContentLayoutId;
          if (i != 0) {
              setContentView(i);
          }
      }
  
      public boolean onCreatePanelMenu(int featureId, Menu menu) {
          if (featureId != 0) {
              return true;
          }
          super.onCreatePanelMenu(featureId, menu);
          this.mMenuHostHelper.onCreateMenu(menu, getMenuInflater());
          return true;
      }
  
      public boolean onMenuItemSelected(int featureId, MenuItem item) {
          if (super.onMenuItemSelected(featureId, item)) {
              return true;
          }
          if (featureId == 0) {
              return this.mMenuHostHelper.onMenuItemSelected(item);
          }
          return false;
      }
  
      public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
          Iterator<Consumer<MultiWindowModeChangedInfo>> it = this.mOnMultiWindowModeChangedListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(new MultiWindowModeChangedInfo(isInMultiWindowMode));
          }
      }
  
      public void onMultiWindowModeChanged(boolean isInMultiWindowMode, Configuration newConfig) {
          Iterator<Consumer<MultiWindowModeChangedInfo>> it = this.mOnMultiWindowModeChangedListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(new MultiWindowModeChangedInfo(isInMultiWindowMode, newConfig));
          }
      }
  
      /* access modifiers changed from: protected */
      public void onNewIntent(Intent intent) {
          super.onNewIntent(intent);
          Iterator<Consumer<Intent>> it = this.mOnNewIntentListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(intent);
          }
      }
  
      public void onPanelClosed(int featureId, Menu menu) {
          this.mMenuHostHelper.onMenuClosed(menu);
          super.onPanelClosed(featureId, menu);
      }
  
      public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
          Iterator<Consumer<PictureInPictureModeChangedInfo>> it = this.mOnPictureInPictureModeChangedListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(new PictureInPictureModeChangedInfo(isInPictureInPictureMode));
          }
      }
  
      public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
          Iterator<Consumer<PictureInPictureModeChangedInfo>> it = this.mOnPictureInPictureModeChangedListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(new PictureInPictureModeChangedInfo(isInPictureInPictureMode, newConfig));
          }
      }
  
      public boolean onPreparePanel(int featureId, View view, Menu menu) {
          if (featureId != 0) {
              return true;
          }
          super.onPreparePanel(featureId, view, menu);
          this.mMenuHostHelper.onPrepareMenu(menu);
          return true;
      }
  
      @Deprecated
      public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
          if (!this.mActivityResultRegistry.dispatchResult(requestCode, -1, new Intent().putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS, permissions).putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS, grantResults)) && Build.VERSION.SDK_INT >= 23) {
              super.onRequestPermissionsResult(requestCode, permissions, grantResults);
          }
      }
  
      @Deprecated
      public Object onRetainCustomNonConfigurationInstance() {
          return null;
      }
  
      public final Object onRetainNonConfigurationInstance() {
          NonConfigurationInstances nonConfigurationInstances;
          Object onRetainCustomNonConfigurationInstance = onRetainCustomNonConfigurationInstance();
          ViewModelStore viewModelStore = this.mViewModelStore;
          if (viewModelStore == null && (nonConfigurationInstances = (NonConfigurationInstances) getLastNonConfigurationInstance()) != null) {
              viewModelStore = nonConfigurationInstances.viewModelStore;
          }
          if (viewModelStore == null && onRetainCustomNonConfigurationInstance == null) {
              return null;
          }
          NonConfigurationInstances nonConfigurationInstances2 = new NonConfigurationInstances();
          nonConfigurationInstances2.custom = onRetainCustomNonConfigurationInstance;
          nonConfigurationInstances2.viewModelStore = viewModelStore;
          return nonConfigurationInstances2;
      }
  
      /* access modifiers changed from: protected */
      public void onSaveInstanceState(Bundle outState) {
          Lifecycle lifecycle = getLifecycle();
          if (lifecycle instanceof LifecycleRegistry) {
              ((LifecycleRegistry) lifecycle).setCurrentState(Lifecycle.State.CREATED);
          }
          super.onSaveInstanceState(outState);
          this.mSavedStateRegistryController.performSave(outState);
      }
  
      public void onTrimMemory(int level) {
          super.onTrimMemory(level);
          Iterator<Consumer<Integer>> it = this.mOnTrimMemoryListeners.iterator();
          while (it.hasNext()) {
              it.next().accept(Integer.valueOf(level));
          }
      }
  
      public Context peekAvailableContext() {
          return this.mContextAwareHelper.peekAvailableContext();
      }
  
      public final <I, O> ActivityResultLauncher<I> registerForActivityResult(ActivityResultContract<I, O> activityResultContract, ActivityResultCallback<O> activityResultCallback) {
          return registerForActivityResult(activityResultContract, this.mActivityResultRegistry, activityResultCallback);
      }
  
      public final <I, O> ActivityResultLauncher<I> registerForActivityResult(ActivityResultContract<I, O> activityResultContract, ActivityResultRegistry registry, ActivityResultCallback<O> activityResultCallback) {
          return registry.register("activity_rq#" + this.mNextLocalRequestCode.getAndIncrement(), this, activityResultContract, activityResultCallback);
      }
  
      public void removeMenuProvider(MenuProvider provider) {
          this.mMenuHostHelper.removeMenuProvider(provider);
      }
  
      public final void removeOnConfigurationChangedListener(Consumer<Configuration> consumer) {
          this.mOnConfigurationChangedListeners.remove(consumer);
      }
  
      public final void removeOnContextAvailableListener(OnContextAvailableListener listener) {
          this.mContextAwareHelper.removeOnContextAvailableListener(listener);
      }
  
      public final void removeOnMultiWindowModeChangedListener(Consumer<MultiWindowModeChangedInfo> consumer) {
          this.mOnMultiWindowModeChangedListeners.remove(consumer);
      }
  
      public final void removeOnNewIntentListener(Consumer<Intent> consumer) {
          this.mOnNewIntentListeners.remove(consumer);
      }
  
      public final void removeOnPictureInPictureModeChangedListener(Consumer<PictureInPictureModeChangedInfo> consumer) {
          this.mOnPictureInPictureModeChangedListeners.remove(consumer);
      }
  
      public final void removeOnTrimMemoryListener(Consumer<Integer> consumer) {
          this.mOnTrimMemoryListeners.remove(consumer);
      }
  
      public void reportFullyDrawn() {
          try {
              if (Trace.isEnabled()) {
                  Trace.beginSection("reportFullyDrawn() for ComponentActivity");
              }
              if (Build.VERSION.SDK_INT > 19) {
                  super.reportFullyDrawn();
              } else if (Build.VERSION.SDK_INT == 19 && ContextCompat.checkSelfPermission(this, "android.permission.UPDATE_DEVICE_STATS") == 0) {
                  super.reportFullyDrawn();
              }
          } finally {
              Trace.endSection();
          }
      }
  
      public void setContentView(int layoutResID) {
          initViewTreeOwners();
          super.setContentView(layoutResID);
      }
  
      public void setContentView(View view) {
          initViewTreeOwners();
          super.setContentView(view);
      }
  
      public void setContentView(View view, ViewGroup.LayoutParams params) {
          initViewTreeOwners();
          super.setContentView(view, params);
      }
  
      @Deprecated
      public void startActivityForResult(Intent intent, int requestCode) {
          super.startActivityForResult(intent, requestCode);
      }
  
      @Deprecated
      public void startActivityForResult(Intent intent, int requestCode, Bundle options) {
          super.startActivityForResult(intent, requestCode, options);
      }
  
      @Deprecated
      public void startIntentSenderForResult(IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException {
          super.startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags);
      }
  
      @Deprecated
      public void startIntentSenderForResult(IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) throws IntentSender.SendIntentException {
          super.startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags, options);
      }
  }
  