Disable recent only when face enrolled and secure applications launched

The new appraoach add more consolidate conditions for DISABLE_RECENT
- mCameraGestureIntercepted = true
- isKeyguard occluded = true
- isFaceEnrolled() = true
- is screen lock = PIN/PATTERN/PASSWORD

Bug: 290710551
Test: Setup screen lock to secure mode, manual locked keyguard,
    double click trigger GCA, disable recents only when face enrolled.
Test: Setup screen lock to secure mode, do not enroll face,
    double click trigger GCA, recents does not disabled.
Test: Concurrently unlock throught fingerprint and double click to
    trigger GCA, make sure exit GCA would reset recents
Change-Id: I05961e37b086bd37c3add9ed63754b9d95531f00
This commit is contained in:
lbill
2023-07-26 12:08:54 +00:00
parent 3490e6fb8f
commit a6b42db1c3

View File

@@ -3218,7 +3218,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
flags |= StatusBarManager.DISABLE_RECENT;
}
if (mPowerGestureIntercepted && mOccluded && isSecure()) {
if (mPowerGestureIntercepted && mOccluded && isSecure()
&& mUpdateMonitor.isFaceEnrolled()) {
flags |= StatusBarManager.DISABLE_RECENT;
}