Cancel the recents animation when keyguard is occluding.[1/2]
User can enter recents animation while a showWhenLocked activity on top of keyguard by touch down navigation bar. In legacy, Launcher start the recents animation by keep the original top activity on top. But for shell transition, Launcher will start home activity with transient launch flag. When core receive start activity request, unlike startRecentsAnimation, core will try to move the activity to top, which break the keyguard occluding state, so the keyguard will pop up on screen before dismiss recents animation, and there is not have enough information for shell know whether to hide the surface of the original top activity. To make the occluding state unchange during start transient launch, we do not resume the launcher activity, also we do not move it to top. So what we need to do is to collect the surfaces from launcher + top occluding task + wallpaper and send this transition to shell. Another change is Launcher will finish recents animation by calling the RecentsAnimationController directly without start home activity. By determine the top activity when set restoreTransientOrder, there will update the hierarchy, which may change the occluding state and decide whether to play unoccluding animation. Bug: 230582311 Test: monitor no strange animation when running atest KeyguardTests Test: enable shell transition. Start showWhenLocked activity while keyguard showing. Scroll up to dismiss the activity and verify the activity and home shall be stopped and only keyguard remains on the screen. Also verify entering recents works fine when device is unlocked. Change-Id: Ia16fa01fdc09547cfb3ae1370875ac70f07ede8d
Loading
Please register or sign in to comment