From a6b42db1c335b2d11982c719c4bd57fa1037eac6 Mon Sep 17 00:00:00 2001 From: lbill Date: Wed, 26 Jul 2023 12:08:54 +0000 Subject: [PATCH] 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 --- .../com/android/systemui/keyguard/KeyguardViewMediator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 5d7ea1cc5819e..2915bb39628c0 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -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; }