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
This commit is contained in:
Issei Suzuki
2022-02-22 17:12:08 +00:00
parent d7d3c2d96b
commit f0a9429cc2

View File

@@ -202,8 +202,11 @@ class WallpaperController {
"Win " + w + ": token animating, looking behind."); "Win " + w + ": token animating, looking behind.");
} }
mFindResults.setIsWallpaperTargetForLetterbox(w.hasWallpaperForLetterboxBackground()); mFindResults.setIsWallpaperTargetForLetterbox(w.hasWallpaperForLetterboxBackground());
// Found a target! End search. // While the keyguard is going away, both notification shade and a normal activity such
return true; // 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; return false;
}; };