Keyguard was hiding occluding activities

Most reproducible while the device is asleep on AoD for a period of
time. The system detects the double tap power gesture, and launches
the camera activity immediately. However, in the failing case,
DreamManagerService only stops the dream after the activity has been
launched. This setOccluded path has already happened when the call to
wakeup comes in and decides that the StatusBarState should equal
KEYGUARD, which is incorrect. This blocks the activity which is
running underneath. The correct state is SHADE. Add a check for
occlusion before deciding to show the keyguard

Fixes: 199349731
Test: launch camera over lockscreen
Change-Id: I817fcdc80db79ad95367dc7a49eadaa5e366c3ef
This commit is contained in:
Matt Pietal
2022-02-23 09:16:27 -05:00
parent 5d6650dd22
commit 7a2abccf35

View File

@@ -2954,8 +2954,9 @@ public class StatusBar extends CoreStartable implements
// turned off fully.
boolean keyguardForDozing = mDozeServiceHost.getDozingRequested()
&& (!mDeviceInteractive || isGoingToSleep() && (isScreenFullyOff() || mIsKeyguard));
boolean isWakingAndOccluded = isOccluded() && isWaking();
boolean shouldBeKeyguard = (mStatusBarStateController.isKeyguardRequested()
|| keyguardForDozing) && !wakeAndUnlocking;
|| keyguardForDozing) && !wakeAndUnlocking && !isWakingAndOccluded;
if (keyguardForDozing) {
updatePanelExpansionForKeyguard();
}
@@ -3765,6 +3766,10 @@ public class StatusBar extends CoreStartable implements
== WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP;
}
boolean isWaking() {
return mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_WAKING;
}
public void notifyBiometricAuthModeChanged() {
mDozeServiceHost.updateDozing();
updateScrimController();