? mLastNonConfigurationInstances.fragments : null);
}
mFragments.dispatchCreate();
- if (!isAtLeastO()) {
- getApplication().dispatchActivityCreated(this, savedInstanceState);
- }
+ getApplication().dispatchActivityCreated(this, savedInstanceState);
if (mVoiceInteractor != null) {
mVoiceInteractor.attachActivity(this);
}
mCalled = true;
mFragments.doLoaderStart();
- if (!isAtLeastO()) {
- getApplication().dispatchActivityStarted(this);
- }
+
+ getApplication().dispatchActivityStarted(this);
}
/**
@CallSuper
protected void onResume() {
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onResume " + this);
- if (!isAtLeastO()) {
- getApplication().dispatchActivityResumed(this);
- }
+ getApplication().dispatchActivityResumed(this);
mActivityTransitionState.onResume(this, isTopOfTask());
mCalled = true;
}
saveManagedDialogs(outState);
mActivityTransitionState.saveState(outState);
storeHasCurrentPermissionRequest(outState);
- if (isAtLeastO()) {
- getApplication().dispatchActivitySaveInstanceState(this, outState);
- }
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState);
}
onSaveInstanceState(outState, outPersistentState);
saveManagedDialogs(outState);
storeHasCurrentPermissionRequest(outState);
- if (isAtLeastO()) {
- getApplication().dispatchActivitySaveInstanceState(this, outState);
- }
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onSaveInstanceState " + this + ": " + outState +
", " + outPersistentState);
}
if (p != null) {
outState.putParcelable(FRAGMENTS_TAG, p);
}
- if (!isAtLeastO()) {
- getApplication().dispatchActivitySaveInstanceState(this, outState);
- }
+ getApplication().dispatchActivitySaveInstanceState(this, outState);
}
/**
@CallSuper
protected void onPause() {
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onPause " + this);
- if (!isAtLeastO()) {
- getApplication().dispatchActivityPaused(this);
- }
+ getApplication().dispatchActivityPaused(this);
mCalled = true;
}
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onStop " + this);
if (mActionBar != null) mActionBar.setShowHideAnimationEnabled(false);
mActivityTransitionState.onStop();
- if (!isAtLeastO()) {
- getApplication().dispatchActivityStopped(this);
- }
+ getApplication().dispatchActivityStopped(this);
mTranslucentCallback = null;
mCalled = true;
}
if (mActionBar != null) {
mActionBar.onDestroy();
}
- if (!isAtLeastO()) {
- getApplication().dispatchActivityDestroyed(this);
- }
+
+ getApplication().dispatchActivityDestroyed(this);
}
/**
return mParent != null ? mParent.getActivityToken() : mToken;
}
- final void performCreateCommon(Bundle icicle) {
- mActivityTransitionState.readState(icicle);
+ final void performCreateCommon() {
mVisibleFromClient = !mWindow.getWindowStyle().getBoolean(
com.android.internal.R.styleable.Window_windowNoDisplay, false);
mFragments.dispatchActivityCreated();
mActivityTransitionState.setEnterActivityOptions(this, getActivityOptions());
- if (isAtLeastO()) {
- getApplication().dispatchActivityCreated(this, icicle);
- }
}
final void performCreate(Bundle icicle) {
restoreHasCurrentPermissionRequest(icicle);
- if (isAtLeastO()) {
- getApplication().dispatchActivityPreCreated(this, icicle);
- }
onCreate(icicle);
- performCreateCommon(icicle);
+ mActivityTransitionState.readState(icicle);
+ performCreateCommon();
}
final void performCreate(Bundle icicle, PersistableBundle persistentState) {
restoreHasCurrentPermissionRequest(icicle);
- if (isAtLeastO()) {
- getApplication().dispatchActivityPreCreated(this, icicle);
- }
onCreate(icicle, persistentState);
- performCreateCommon(icicle);
+ mActivityTransitionState.readState(icicle);
+ performCreateCommon();
}
final void performStart() {
}
mActivityTransitionState.enterReady(this);
- if (isAtLeastO()) {
- getApplication().dispatchActivityStarted(this);
- }
}
final void performRestart() {
mFragments.dispatchResume();
mFragments.execPendingActions();
- if (isAtLeastO()) {
- getApplication().dispatchActivityResumed(this);
- }
+
onPostResume();
if (!mCalled) {
throw new SuperNotCalledException(
mCalled = false;
onPause();
mResumed = false;
- if (isAtLeastO()) {
- getApplication().dispatchActivityPaused(this);
- }
if (!mCalled && getApplicationInfo().targetSdkVersion
>= android.os.Build.VERSION_CODES.GINGERBREAD) {
throw new SuperNotCalledException(
"Activity " + mComponent.toShortString() +
" did not call through to super.onPause()");
}
+ mResumed = false;
}
final void performUserLeaving() {
final void performStop(boolean preserveWindow) {
mDoReportFullyDrawn = false;
mFragments.doLoaderStop(mChangingConfigurations /*retain*/);
- boolean dispatchActivityStopped = !mStopped;
+
if (!mStopped) {
if (mWindow != null) {
mWindow.closeAllPanels();
mStopped = true;
}
mResumed = false;
- if (dispatchActivityStopped && isAtLeastO()) {
- getApplication().dispatchActivityStopped(this);
- }
}
final void performDestroy() {
if (mVoiceInteractor != null) {
mVoiceInteractor.detachActivity();
}
- if (isAtLeastO()) {
- getApplication().dispatchActivityDestroyed(this);
- }
- }
-
- private boolean isAtLeastO() {
- return getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.O;
}
final void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode) {
String cls = clsSeq.toString();
char c = cls.charAt(0);
if (c == '.') {
- return (pkg + cls).intern();
+ return pkg + cls;
}
if (cls.indexOf('.') < 0) {
StringBuilder b = new StringBuilder(pkg);
b.append('.');
b.append(cls);
- return b.toString().intern();
+ return b.toString();
}
- return cls.intern();
+ return cls;
}
private static String buildCompoundName(String pkg,
+ pkg + ": " + nameError;
return null;
}
- return (pkg + proc).intern();
+ return pkg + proc;
}
String nameError = validateName(proc, true, false);
if (nameError != null && !"system".equals(proc)) {
+ pkg + ": " + nameError;
return null;
}
- return proc.intern();
+ return proc;
}
private static String buildProcessName(String pkg, String defProc,
if (v != null) {
if (v.type == TypedValue.TYPE_STRING) {
CharSequence cs = v.coerceToString();
- data.putString(name, cs != null ? cs.toString().intern() : null);
+ data.putString(name, cs != null ? cs.toString() : null);
} else if (v.type == TypedValue.TYPE_INT_BOOLEAN) {
data.putBoolean(name, v.data != 0);
} else if (v.type >= TypedValue.TYPE_FIRST_INT