From 4cb8f4302d8126d51e0ec56e226e6c8d6b59ba7a Mon Sep 17 00:00:00 2001 From: lbill Date: Tue, 18 Jul 2023 04:29:29 +0000 Subject: Consolidate DISABLE_RECENT condition in adjustStatusBarLocked() Due to `cameraGestureTriggered signal` && `Secure Camera launched` are asynchronize, we need to do more check in adjustStatusBarLocked() 1. Consolidate "mPowerGestureIntercepted && mOccluded && isSecure()" for DISABLE_RECENT in adjustStatusBarLocked() 2. Do not disable recents key when `screen lock option` is `Swipe` Note: CUJ : "Fingerprint | Face unlock" + "Double tap power to launch GCA" Timing issue : get the power gesture attempt and then the non-secure camera was launched(at the time keyguard has gone) Bug: 284669723 Bug: 288201661 Bug: 289334181 Test: Setup screen lock and fingerprint, then double tap power key launch GCA & Figerprint/Face auth concurrently, observe the DISABLE_RECENT should be reset after unlocked Test: Setup screen lock to 'swipe', then double tap power key launch camera should not DISABLE_RECENT Test: atest LaunchCameraFromHomeIn3ButtonMode Test: atest LaunchCameraFromLockScreenIn3ButtonMode Change-Id: I089a0dfd2e3cd1c501faf70fb25e496f5899ac74 --- .../src/com/android/systemui/keyguard/KeyguardViewMediator.java | 5 ++++- 1 file changed, 4 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 2d82c508dd1f..ddcb31ff8c76 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2945,6 +2945,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, } private void onKeyguardExitFinished() { + if (DEBUG) Log.d(TAG, "onKeyguardExitFinished()"); // only play "unlock" noises if not on a call (since the incall UI // disables the keyguard) if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)) { @@ -3166,13 +3167,14 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, flags |= StatusBarManager.DISABLE_RECENT; } - if (mPowerGestureIntercepted) { + if (mPowerGestureIntercepted && mOccluded && isSecure()) { flags |= StatusBarManager.DISABLE_RECENT; } if (DEBUG) { Log.d(TAG, "adjustStatusBarLocked: mShowing=" + mShowing + " mOccluded=" + mOccluded + " isSecure=" + isSecure() + " force=" + forceHideHomeRecentsButtons + + " mPowerGestureIntercepted=" + mPowerGestureIntercepted + " --> flags=0x" + Integer.toHexString(flags)); } @@ -3400,6 +3402,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, pw.print(" mPendingLock: "); pw.println(mPendingLock); pw.print(" wakeAndUnlocking: "); pw.println(mWakeAndUnlocking); pw.print(" mPendingPinLock: "); pw.println(mPendingPinLock); + pw.print(" mPowerGestureIntercepted: "); pw.println(mPowerGestureIntercepted); } /** -- cgit v1.2.3-59-g8ed1b