summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Issei Suzuki <issei@google.com> 2022-02-22 17:12:08 +0000
committer Issei Suzuki <issei@google.com> 2022-02-23 10:36:47 +0000
commitf0a9429cc250f30f20375c9a6ebe9fbe0cb0082f (patch)
treea45488a263c6df924302d9e25ba459e47df825f5
parentd7d3c2d96b5e30c4cb6f0ea944fbe4442f81d567 (diff)
Keep showing wallpaper when starting an app immediatly after unlock.
Wallpaper is controlled by NotificationShade while the lock screen is shown, otherwise by the launcher. We used to switch it when unlock animation finishes, but it caused an issue when a user starts anotehr app transition (e.g. launch an app by tapping an icon on a home screen) before the unlock animation finishes. We give higher priority on the launcher to NotificationShade, so that this switch happens earlier. Bug: 215685199 Test: Manual. Unlock the device and taps an app icon to launch it. Change-Id: Iddf58c3a3966e285870711f39b73eee7dab804e0
-rw-r--r--services/core/java/com/android/server/wm/WallpaperController.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java
index 4b2aa0f76272..b61e711d75f5 100644
--- a/services/core/java/com/android/server/wm/WallpaperController.java
+++ b/services/core/java/com/android/server/wm/WallpaperController.java
@@ -202,8 +202,11 @@ class WallpaperController {
"Win " + w + ": token animating, looking behind.");
}
mFindResults.setIsWallpaperTargetForLetterbox(w.hasWallpaperForLetterboxBackground());
- // Found a target! End search.
- return true;
+ // While the keyguard is going away, both notification shade and a normal activity such
+ // as a launcher can satisfy criteria for a wallpaper target. In this case, we should
+ // chose the normal activity, otherwise wallpaper becomes invisible when a new animation
+ // starts before the keyguard going away animation finishes.
+ return w.mActivityRecord != null;
}
return false;
};