Loading packages/SystemUI/src/com/android/keyguard/KeyguardListenModel.kt +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ data class KeyguardFaceListenModel( val bouncerFullyShown: Boolean, val faceAuthenticated: Boolean, val faceDisabled: Boolean, val goingToSleep: Boolean, val keyguardAwake: Boolean, val keyguardGoingAway: Boolean, val listeningForFaceAssistant: Boolean, Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +20 −7 Original line number Diff line number Diff line Loading @@ -628,7 +628,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab */ public void setKeyguardGoingAway(boolean goingAway) { mKeyguardGoingAway = goingAway; updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); // This is set specifically to stop face authentication from running. updateBiometricListeningState(BIOMETRIC_ACTION_STOP); } /** Loading Loading @@ -1746,7 +1747,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab cb.onFinishedGoingToSleep(arg1); } } updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); // This is set specifically to stop face authentication from running. updateBiometricListeningState(BIOMETRIC_ACTION_STOP); } private void handleScreenTurnedOff() { Loading @@ -1764,8 +1766,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab cb.onDreamingStateChanged(mIsDreaming); } } if (mIsDreaming) { updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); updateFaceListeningState(BIOMETRIC_ACTION_STOP); } else { updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); } } private void handleUserInfoChanged(int userId) { Assert.isMainThread(); Loading Loading @@ -2477,9 +2484,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass && !mBouncerFullyShown); // If the device supports face detection (without authentication), allow it to happen // if the device is in lockdown mode. Otherwise, prevent scanning. // If the device supports face detection (without authentication) and bypass is enabled, // allow face scanning to happen if the device is in lockdown mode. // Otherwise, prevent scanning. final boolean supportsDetectOnly = !mFaceSensorProperties.isEmpty() && canBypass && mFaceSensorProperties.get(0).supportsFaceDetection; if (isLockDown && !supportsDetectOnly) { strongAuthAllowsScanning = false; Loading @@ -2494,8 +2503,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = (mBouncerFullyShown || mAuthInterruptActive || mOccludingAppRequestingFace || awakeKeyguard || shouldListenForFaceAssistant (mBouncerFullyShown && !mGoingToSleep || mAuthInterruptActive || mOccludingAppRequestingFace || awakeKeyguard || shouldListenForFaceAssistant || mAuthController.isUdfpsFingerDown()) && !mSwitchingUser && !faceDisabledForUser && becauseCannotSkipBouncer && !mKeyguardGoingAway && biometricEnabledForUser && !mLockIconPressed Loading @@ -2517,6 +2529,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mBouncerFullyShown, faceAuthenticated, faceDisabledForUser, mGoingToSleep, awakeKeyguard, mKeyguardGoingAway, shouldListenForFaceAssistant, Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardListenQueueTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ private fun faceModel(user: Int) = KeyguardFaceListenModel( bouncerFullyShown = false, faceAuthenticated = false, faceDisabled = false, goingToSleep = false, keyguardAwake = false, keyguardGoingAway = false, listeningForFaceAssistant = false, Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardListenModel.kt +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ data class KeyguardFaceListenModel( val bouncerFullyShown: Boolean, val faceAuthenticated: Boolean, val faceDisabled: Boolean, val goingToSleep: Boolean, val keyguardAwake: Boolean, val keyguardGoingAway: Boolean, val listeningForFaceAssistant: Boolean, Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +20 −7 Original line number Diff line number Diff line Loading @@ -628,7 +628,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab */ public void setKeyguardGoingAway(boolean goingAway) { mKeyguardGoingAway = goingAway; updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); // This is set specifically to stop face authentication from running. updateBiometricListeningState(BIOMETRIC_ACTION_STOP); } /** Loading Loading @@ -1746,7 +1747,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab cb.onFinishedGoingToSleep(arg1); } } updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); // This is set specifically to stop face authentication from running. updateBiometricListeningState(BIOMETRIC_ACTION_STOP); } private void handleScreenTurnedOff() { Loading @@ -1764,8 +1766,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab cb.onDreamingStateChanged(mIsDreaming); } } if (mIsDreaming) { updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); updateFaceListeningState(BIOMETRIC_ACTION_STOP); } else { updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); } } private void handleUserInfoChanged(int userId) { Assert.isMainThread(); Loading Loading @@ -2477,9 +2484,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass && !mBouncerFullyShown); // If the device supports face detection (without authentication), allow it to happen // if the device is in lockdown mode. Otherwise, prevent scanning. // If the device supports face detection (without authentication) and bypass is enabled, // allow face scanning to happen if the device is in lockdown mode. // Otherwise, prevent scanning. final boolean supportsDetectOnly = !mFaceSensorProperties.isEmpty() && canBypass && mFaceSensorProperties.get(0).supportsFaceDetection; if (isLockDown && !supportsDetectOnly) { strongAuthAllowsScanning = false; Loading @@ -2494,8 +2503,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = (mBouncerFullyShown || mAuthInterruptActive || mOccludingAppRequestingFace || awakeKeyguard || shouldListenForFaceAssistant (mBouncerFullyShown && !mGoingToSleep || mAuthInterruptActive || mOccludingAppRequestingFace || awakeKeyguard || shouldListenForFaceAssistant || mAuthController.isUdfpsFingerDown()) && !mSwitchingUser && !faceDisabledForUser && becauseCannotSkipBouncer && !mKeyguardGoingAway && biometricEnabledForUser && !mLockIconPressed Loading @@ -2517,6 +2529,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mBouncerFullyShown, faceAuthenticated, faceDisabledForUser, mGoingToSleep, awakeKeyguard, mKeyguardGoingAway, shouldListenForFaceAssistant, Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardListenQueueTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ private fun faceModel(user: Int) = KeyguardFaceListenModel( bouncerFullyShown = false, faceAuthenticated = false, faceDisabled = false, goingToSleep = false, keyguardAwake = false, keyguardGoingAway = false, listeningForFaceAssistant = false, Loading