Fix issue where cold-start launching an activity from the shade while an occluding activity is visible would result in an inescapable black screen.

Fixes: 227341125
Test: use Notify.apk (go/notify-apk) to post a notification that'll launch an activity, then force close Notify, open a Meet call (or other SHOW_WHEN_LOCKED activity), lock the phone, press the power button, pull down the shade, tap the Notify notification, UDFPS, note no inescapable black screen
Change-Id: I57c57cbb156dae79fa46e917285330f07ff7edce
This commit is contained in:
Josh Tsuji
2022-03-31 16:17:04 -04:00
parent e8c5e4ad34
commit 432e035300

View File

@@ -1388,8 +1388,11 @@ public class CentralSurfaces extends CoreStartable implements
* keyguard. * keyguard.
*/ */
private void dispatchPanelExpansionForKeyguardDismiss(float fraction, boolean trackingTouch) { private void dispatchPanelExpansionForKeyguardDismiss(float fraction, boolean trackingTouch) {
// Things that mean we're not dismissing the keyguard, and should ignore this expansion: // Things that mean we're not swiping to dismiss the keyguard, and should ignore this
// expansion:
// - Keyguard isn't even visible. // - Keyguard isn't even visible.
// - Keyguard is occluded. Expansion changes here are the shade being expanded over the
// occluding activity.
// - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt). // - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt).
// - The SIM is locked, you can't swipe to unlock. If the SIM is locked but there is no // - The SIM is locked, you can't swipe to unlock. If the SIM is locked but there is no
// device lock set, canDismissLockScreen returns true even though you should not be able // device lock set, canDismissLockScreen returns true even though you should not be able
@@ -1397,6 +1400,7 @@ public class CentralSurfaces extends CoreStartable implements
// - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the // - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
// keyguard. // keyguard.
if (!isKeyguardShowing() if (!isKeyguardShowing()
|| isOccluded()
|| !mKeyguardStateController.canDismissLockScreen() || !mKeyguardStateController.canDismissLockScreen()
|| mKeyguardViewMediator.isAnySimPinSecure() || mKeyguardViewMediator.isAnySimPinSecure()
|| (mNotificationPanelViewController.isQsExpanded() && trackingTouch)) { || (mNotificationPanelViewController.isQsExpanded() && trackingTouch)) {