407 lines
13 KiB
Java
407 lines
13 KiB
Java
|
package androidx.appcompat.app;
|
||
|
|
||
|
import android.content.ComponentName;
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.content.res.Configuration;
|
||
|
import android.content.res.Resources;
|
||
|
import android.os.Bundle;
|
||
|
import android.view.KeyEvent;
|
||
|
import android.view.Menu;
|
||
|
import android.view.MenuInflater;
|
||
|
import android.view.MenuItem;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import androidx.appcompat.widget.Toolbar;
|
||
|
import androidx.core.app.ActivityCompat;
|
||
|
import androidx.fragment.app.FragmentActivity;
|
||
|
import o.C14957gcv;
|
||
|
import o.C8069dAO;
|
||
|
import o.EkX;
|
||
|
import o.FNE;
|
||
|
import o.InterfaceC17278vUG;
|
||
|
import o.Itu;
|
||
|
import o.Plu;
|
||
|
import o.UBQ;
|
||
|
import o.XOs;
|
||
|
import o.Yju;
|
||
|
import o.iuP;
|
||
|
import o.pwE;
|
||
|
import o.qPj;
|
||
|
import o.sxb;
|
||
|
import o.uLO;
|
||
|
import o.vsf;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public class AppCompatActivity extends FragmentActivity implements qPj, EkX.HBt {
|
||
|
private static final String DELEGATE_TAG = "androidx:appcompat";
|
||
|
private Yju mDelegate;
|
||
|
private Resources mResources;
|
||
|
|
||
|
private boolean performMenuItemShortcut(KeyEvent keyEvent) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public void onLocalesChanged(Plu plu) {
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public void onNightModeChanged(int i) {
|
||
|
}
|
||
|
|
||
|
public void onPrepareSupportNavigateUpTaskStack(EkX ekX) {
|
||
|
}
|
||
|
|
||
|
@Override // o.qPj
|
||
|
public void onSupportActionModeFinished(vsf vsfVar) {
|
||
|
}
|
||
|
|
||
|
@Override // o.qPj
|
||
|
public void onSupportActionModeStarted(vsf vsfVar) {
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public void onSupportContentChanged() {
|
||
|
}
|
||
|
|
||
|
@Override // o.qPj
|
||
|
public vsf onWindowStartingSupportActionMode(vsf.HBt hBt) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public void setSupportProgress(int i) {
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public void setSupportProgressBarIndeterminate(boolean z) {
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public void setSupportProgressBarIndeterminateVisibility(boolean z) {
|
||
|
}
|
||
|
|
||
|
@Deprecated
|
||
|
public void setSupportProgressBarVisibility(boolean z) {
|
||
|
}
|
||
|
|
||
|
public AppCompatActivity() {
|
||
|
initDelegate();
|
||
|
}
|
||
|
|
||
|
public AppCompatActivity(int i) {
|
||
|
super(i);
|
||
|
initDelegate();
|
||
|
}
|
||
|
|
||
|
private void initDelegate() {
|
||
|
getSavedStateRegistry().a(DELEGATE_TAG, new FNE.Sts(this) { // from class: androidx.appcompat.app.AppCompatActivity.4
|
||
|
final AppCompatActivity b;
|
||
|
|
||
|
{
|
||
|
this.b = this;
|
||
|
}
|
||
|
|
||
|
@Override // o.FNE.Sts
|
||
|
public Bundle AK_() {
|
||
|
Bundle bundle = new Bundle();
|
||
|
this.b.getDelegate().cI_(bundle);
|
||
|
return bundle;
|
||
|
}
|
||
|
});
|
||
|
addOnContextAvailableListener(new InterfaceC17278vUG(this) { // from class: androidx.appcompat.app.AppCompatActivity.2
|
||
|
final AppCompatActivity c;
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC17278vUG
|
||
|
public void a(Context context) {
|
||
|
Yju delegate = this.c.getDelegate();
|
||
|
delegate.o();
|
||
|
delegate.cC_(this.c.getSavedStateRegistry().AH_(AppCompatActivity.DELEGATE_TAG));
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity, android.view.ContextThemeWrapper, android.content.ContextWrapper
|
||
|
public void attachBaseContext(Context context) {
|
||
|
super.attachBaseContext(getDelegate().g(context));
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity, android.view.ContextThemeWrapper, android.content.ContextWrapper, android.content.Context
|
||
|
public void setTheme(int i) {
|
||
|
super.setTheme(i);
|
||
|
getDelegate().b(i);
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
protected void onPostCreate(Bundle bundle) {
|
||
|
super.onPostCreate(bundle);
|
||
|
getDelegate().cH_(bundle);
|
||
|
}
|
||
|
|
||
|
public pwE getSupportActionBar() {
|
||
|
return getDelegate().m();
|
||
|
}
|
||
|
|
||
|
public void setSupportActionBar(Toolbar toolbar) {
|
||
|
getDelegate().a(toolbar);
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
public MenuInflater getMenuInflater() {
|
||
|
return getDelegate().cz_();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity
|
||
|
public void setContentView(int i) {
|
||
|
initViewTreeOwners();
|
||
|
getDelegate().d(i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity
|
||
|
public void setContentView(View view) {
|
||
|
initViewTreeOwners();
|
||
|
getDelegate().d(view);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity
|
||
|
public void setContentView(View view, ViewGroup.LayoutParams layoutParams) {
|
||
|
initViewTreeOwners();
|
||
|
getDelegate().cL_(view, layoutParams);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity
|
||
|
public void addContentView(View view, ViewGroup.LayoutParams layoutParams) {
|
||
|
initViewTreeOwners();
|
||
|
getDelegate().ct_(view, layoutParams);
|
||
|
}
|
||
|
|
||
|
private void initViewTreeOwners() {
|
||
|
getWindow().getDecorView().setTag(UBQ.HBt.view_tree_lifecycle_owner, this);
|
||
|
getWindow().getDecorView().setTag(sxb.Sts.view_tree_view_model_store_owner, this);
|
||
|
View decorView = getWindow().getDecorView();
|
||
|
C14957gcv.e(decorView, "");
|
||
|
decorView.setTag(iuP.RVV.view_tree_saved_state_registry_owner, this);
|
||
|
View decorView2 = getWindow().getDecorView();
|
||
|
C14957gcv.e(decorView2, "");
|
||
|
C14957gcv.e(this, "");
|
||
|
decorView2.setTag(C8069dAO.Sts.view_tree_on_back_pressed_dispatcher_owner, this);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity, android.content.ComponentCallbacks
|
||
|
public void onConfigurationChanged(Configuration configuration) {
|
||
|
super.onConfigurationChanged(configuration);
|
||
|
getDelegate().cB_(configuration);
|
||
|
if (this.mResources != null) {
|
||
|
this.mResources.updateConfiguration(super.getResources().getConfiguration(), super.getResources().getDisplayMetrics());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||
|
public void onPostResume() {
|
||
|
super.onPostResume();
|
||
|
getDelegate().k();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||
|
public void onStart() {
|
||
|
super.onStart();
|
||
|
getDelegate().p();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||
|
public void onStop() {
|
||
|
super.onStop();
|
||
|
getDelegate().t();
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
public <T extends View> T findViewById(int i) {
|
||
|
return (T) getDelegate().c(i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, android.app.Activity, android.view.Window.Callback
|
||
|
public final boolean onMenuItemSelected(int i, MenuItem menuItem) {
|
||
|
if (super.onMenuItemSelected(i, menuItem)) {
|
||
|
return true;
|
||
|
}
|
||
|
pwE supportActionBar = getSupportActionBar();
|
||
|
if (menuItem.getItemId() != 16908332 || supportActionBar == null || (supportActionBar.c() & 4) == 0) {
|
||
|
return false;
|
||
|
}
|
||
|
return onSupportNavigateUp();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||
|
public void onDestroy() {
|
||
|
super.onDestroy();
|
||
|
getDelegate().l();
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
protected void onTitleChanged(CharSequence charSequence, int i) {
|
||
|
super.onTitleChanged(charSequence, i);
|
||
|
getDelegate().c(charSequence);
|
||
|
}
|
||
|
|
||
|
public boolean supportRequestWindowFeature(int i) {
|
||
|
return getDelegate().a(i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity
|
||
|
public void supportInvalidateOptionsMenu() {
|
||
|
getDelegate().n();
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
public void invalidateOptionsMenu() {
|
||
|
getDelegate().n();
|
||
|
}
|
||
|
|
||
|
public vsf startSupportActionMode(vsf.HBt hBt) {
|
||
|
return getDelegate().b(hBt);
|
||
|
}
|
||
|
|
||
|
public boolean onSupportNavigateUp() {
|
||
|
Intent supportParentActivityIntent = getSupportParentActivityIntent();
|
||
|
if (supportParentActivityIntent == null) {
|
||
|
return false;
|
||
|
}
|
||
|
if (supportShouldUpRecreateTask(supportParentActivityIntent)) {
|
||
|
EkX b = EkX.b(this);
|
||
|
onCreateSupportNavigateUpTaskStack(b);
|
||
|
onPrepareSupportNavigateUpTaskStack(b);
|
||
|
b.c();
|
||
|
try {
|
||
|
ActivityCompat.lH_(this);
|
||
|
return true;
|
||
|
} catch (IllegalStateException unused) {
|
||
|
finish();
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
supportNavigateUpTo(supportParentActivityIntent);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override // o.EkX.HBt
|
||
|
public Intent getSupportParentActivityIntent() {
|
||
|
return uLO.mn_(this);
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity, android.view.Window.Callback
|
||
|
public void onContentChanged() {
|
||
|
onSupportContentChanged();
|
||
|
}
|
||
|
|
||
|
public XOs.LWm getDrawerToggleDelegate() {
|
||
|
return getDelegate().j();
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity, android.view.Window.Callback
|
||
|
public boolean onMenuOpened(int i, Menu menu) {
|
||
|
return super.onMenuOpened(i, menu);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.activity.ComponentActivity, android.app.Activity, android.view.Window.Callback
|
||
|
public void onPanelClosed(int i, Menu menu) {
|
||
|
super.onPanelClosed(i, menu);
|
||
|
}
|
||
|
|
||
|
public Yju getDelegate() {
|
||
|
if (this.mDelegate == null) {
|
||
|
this.mDelegate = Yju.bU_(this, this);
|
||
|
}
|
||
|
return this.mDelegate;
|
||
|
}
|
||
|
|
||
|
@Override // androidx.core.app.ComponentActivity, android.app.Activity, android.view.Window.Callback
|
||
|
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
|
||
|
int keyCode = keyEvent.getKeyCode();
|
||
|
pwE supportActionBar = getSupportActionBar();
|
||
|
if (keyCode == 82 && supportActionBar != null && supportActionBar.dH_(keyEvent)) {
|
||
|
return true;
|
||
|
}
|
||
|
return super.dispatchKeyEvent(keyEvent);
|
||
|
}
|
||
|
|
||
|
@Override // android.view.ContextThemeWrapper, android.content.ContextWrapper, android.content.Context
|
||
|
public Resources getResources() {
|
||
|
if (this.mResources == null) {
|
||
|
Itu.a();
|
||
|
}
|
||
|
Resources resources = this.mResources;
|
||
|
return resources == null ? super.getResources() : resources;
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity, android.view.KeyEvent.Callback
|
||
|
public boolean onKeyDown(int i, KeyEvent keyEvent) {
|
||
|
if (performMenuItemShortcut(keyEvent)) {
|
||
|
return true;
|
||
|
}
|
||
|
return super.onKeyDown(i, keyEvent);
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
public void openOptionsMenu() {
|
||
|
pwE supportActionBar = getSupportActionBar();
|
||
|
if (getWindow().hasFeature(0)) {
|
||
|
if (supportActionBar == null || !supportActionBar.h()) {
|
||
|
super.openOptionsMenu();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.app.Activity
|
||
|
public void closeOptionsMenu() {
|
||
|
pwE supportActionBar = getSupportActionBar();
|
||
|
if (getWindow().hasFeature(0)) {
|
||
|
if (supportActionBar == null || !supportActionBar.b()) {
|
||
|
super.closeOptionsMenu();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void onCreateSupportNavigateUpTaskStack(EkX ekX) {
|
||
|
Intent supportParentActivityIntent = getSupportParentActivityIntent();
|
||
|
if (supportParentActivityIntent == null) {
|
||
|
supportParentActivityIntent = uLO.mn_(this);
|
||
|
}
|
||
|
if (supportParentActivityIntent != null) {
|
||
|
ComponentName component = supportParentActivityIntent.getComponent();
|
||
|
if (component == null) {
|
||
|
component = supportParentActivityIntent.resolveActivity(ekX.c.getPackageManager());
|
||
|
}
|
||
|
ekX.nk_(component);
|
||
|
ekX.d.add(supportParentActivityIntent);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void supportNavigateUpTo(Intent intent) {
|
||
|
uLO.LWm.ms_(this, intent);
|
||
|
}
|
||
|
|
||
|
public boolean supportShouldUpRecreateTask(Intent intent) {
|
||
|
return uLO.LWm.mt_(this, intent);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||
|
public void onPause() {
|
||
|
super.onPause();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||
|
public void onResume() {
|
||
|
super.onResume();
|
||
|
}
|
||
|
|
||
|
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||
|
public void onCreate(Bundle bundle) {
|
||
|
super.onCreate(bundle);
|
||
|
}
|
||
|
}
|