Set transient launch after collecting for recent at keyguard

Otherwise RecentsTransitionHandler cannot recognize the transition
for the show-when-locked activity.

Bug: 290558423
Test: Launch a show-when-locked activity.
      Turn off/on screen. Swipe up should back to keyguard.
Change-Id: I41922200bcc855b46c3f49803e02ea5855e84cdd
This commit is contained in:
Riddle Hsu
2023-07-13 07:28:06 +00:00
parent 842ba6f045
commit 2ffa09c9a8

View File

@@ -1591,6 +1591,9 @@ class ActivityStarter {
if (forceTransientTransition) {
transitionController.collect(mLastStartActivityRecord);
transitionController.collect(mPriorAboveTask);
// If keyguard is active and occluded, the transient target won't be moved to front
// to be collected, so set transient again after it is collected.
transitionController.setTransientLaunch(mLastStartActivityRecord, mPriorAboveTask);
final DisplayContent dc = mLastStartActivityRecord.getDisplayContent();
// update wallpaper target to TransientHide
dc.mWallpaperController.adjustWallpaperWindows();