Merge "Create splash screen if activity launched with FLAG_ACTIVITY_CLEAR_TASK" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3abf2a7ca9
@@ -6286,12 +6286,18 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
final int resolvedTheme = evaluateStartingWindowTheme(prev, packageName, theme,
|
final int resolvedTheme = evaluateStartingWindowTheme(prev, packageName, theme,
|
||||||
splashScreenTheme);
|
splashScreenTheme);
|
||||||
|
|
||||||
|
final boolean activityCreated =
|
||||||
|
mState.ordinal() >= STARTED.ordinal() && mState.ordinal() <= STOPPED.ordinal();
|
||||||
|
// If this activity is just created and all activities below are finish, treat this
|
||||||
|
// scenario as warm launch.
|
||||||
|
final boolean newSingleActivity = !newTask && !activityCreated
|
||||||
|
&& task.getActivity((r) -> !r.finishing && r != this) == null;
|
||||||
|
|
||||||
final boolean shown = addStartingWindow(packageName, resolvedTheme,
|
final boolean shown = addStartingWindow(packageName, resolvedTheme,
|
||||||
compatInfo, nonLocalizedLabel, labelRes, icon, logo, windowFlags,
|
compatInfo, nonLocalizedLabel, labelRes, icon, logo, windowFlags,
|
||||||
prev != null ? prev.appToken : null, newTask, taskSwitch, isProcessRunning(),
|
prev != null ? prev.appToken : null,
|
||||||
allowTaskSnapshot(),
|
newTask || newSingleActivity, taskSwitch, isProcessRunning(),
|
||||||
mState.ordinal() >= STARTED.ordinal() && mState.ordinal() <= STOPPED.ordinal(),
|
allowTaskSnapshot(), activityCreated, mSplashScreenStyleEmpty);
|
||||||
mSplashScreenStyleEmpty);
|
|
||||||
if (shown) {
|
if (shown) {
|
||||||
mStartingWindowState = STARTING_WINDOW_SHOWN;
|
mStartingWindowState = STARTING_WINDOW_SHOWN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user