[Shell Transition]Fix occluded activity could show behind keyguard.
Register for specific un/occluded transition filter type in keyguard service. The current condition cannot fulfill every situation. E.g. when close top activity while screen off but next activity is occluded, this should an occluded transition, but since the activity is invisible, the condition would match unoccluded transition. The unoccluded status could accidentally trigger keyguardGoingAway and ask core to resume top activity. But on the contrary, if we add above condition in occluded transition, then when user trying to dismiss occluded activity when unlock keyguard, the condition would match occluded transition. To simplify the filter conditions, additional register the filter for those transition type. Also fix DisplayPolicy#mAwake wasn't synchronized by wm lock. Bug: 241745428 Test: Enable shell transition. 1. Start Activity A with showWhenLocked + turnScreenOn while keyguard locked and screen off. 2. Start Activity B in the same task without showWhenLocked. 3. Turn screen off, activity B finish itself. Monitor the occluded status in SystemUI should be true. No keyguard going away triggerred. 4. Turn screen on. Monitor Activity A resumed and occluded keyguard. 5. Swipe up/press back to dismiss Activity A. Verify device can show keyguard. Test: run atest ActivityVisibilityTests#testTurnScreenOnActivity, monitor test activity won't remain behind keyguard while test finish. Change-Id: Ide14913f2b2d25af2c518866b4df8d1a3ff4b18d
Loading
Please register or sign in to comment