summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wilsonshih <wilsonshih@google.com> 2021-09-22 16:49:33 +0800
committer Wei Sheng Shih <wilsonshih@google.com> 2021-09-22 12:35:36 +0000
commita18586cc1b8427e4d68f1969a1e6f96f0e56ac27 (patch)
treec0949c91e70f68c1219b084681cb6549ca7693b7
parent6d71d15808f1d50ab9f96b380882df1e7440da1a (diff)
Fix missing check empty style splash screen when task switch.
Bug: 200771843 Test: show empty splash screen when launch a trampoline activity from notification. Change-Id: Ib167a3b66a8c4274a96faaa3ff4c2e902e929dab
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
index e6d6028b2aba..bde2b5ff4d60 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
@@ -71,23 +71,13 @@ public class PhoneStartingWindowTypeAlgorithm implements StartingWindowTypeAlgor
+ " topIsHome:" + topIsHome);
}
- final int visibleSplashScreenType = legacySplashScreen
- ? STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN
- : STARTING_WINDOW_TYPE_SPLASH_SCREEN;
-
if (!topIsHome) {
- if (!processRunning) {
+ if (!processRunning || newTask || (taskSwitch && !activityCreated)) {
return useEmptySplashScreen
? STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN
- : visibleSplashScreenType;
- }
- if (newTask) {
- return useEmptySplashScreen
- ? STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN
- : visibleSplashScreenType;
- }
- if (taskSwitch && !activityCreated) {
- return visibleSplashScreenType;
+ : legacySplashScreen
+ ? STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN
+ : STARTING_WINDOW_TYPE_SPLASH_SCREEN;
}
}
if (taskSwitch && allowTaskSnapshot) {