Loading core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -11071,6 +11071,13 @@ public final class Settings { public static final String ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL = "active_unlock_on_biometric_fail"; /** * Whether or not active unlock triggers on legacy unlock intents. * @hide */ public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY = "active_unlock_on_unlock_intent_legacy"; /** * If active unlock triggers on biometric failures, include the following error codes * as a biometric failure. See {@link android.hardware.biometrics.BiometricFaceConstants}. Loading packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class SecureSettings { Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED, Settings.Secure.ACTIVE_UNLOCK_ON_WAKE, Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT, Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL, Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS, Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO, Loading packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_WAKE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED, Loading packages/SystemUI/src/com/android/keyguard/ActiveUnlockConfig.kt +33 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_WAKE import android.provider.Settings.Secure.ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS Loading Loading @@ -86,6 +87,12 @@ class ActiveUnlockConfig @Inject constructor( * Trigger ActiveUnlock when the assistant is triggered. */ ASSISTANT, /** * Trigger ActiveUnlock on legacy unlock intents. This includes tapping on the empty space * of the notification shadse when face auth is enrolled and re-trying face auth on the * primary bouncer. */ UNLOCK_INTENT_LEGACY, } /** Loading @@ -99,6 +106,7 @@ class ActiveUnlockConfig @Inject constructor( } private var requestActiveUnlockOnWakeup = false private var requestActiveUnlockOnUnlockIntentLegacy = false private var requestActiveUnlockOnUnlockIntent = false private var requestActiveUnlockOnBioFail = false Loading @@ -110,6 +118,8 @@ class ActiveUnlockConfig @Inject constructor( private val settingsObserver = object : ContentObserver(handler) { private val wakeUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_WAKE) private val unlockIntentLegacyUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY) private val unlockIntentUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_UNLOCK_INTENT) private val bioFailUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL) private val faceErrorsUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_FACE_ERRORS) Loading Loading @@ -164,6 +174,15 @@ class ActiveUnlockConfig @Inject constructor( ACTIVE_UNLOCK_ON_WAKE, 0, selectedUserInteractor.getSelectedUserId()) == 1 } if (selfChange || uris.contains(unlockIntentLegacyUri)) { requestActiveUnlockOnUnlockIntentLegacy = secureSettings.getIntForUser( ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, 0, selectedUserInteractor.getSelectedUserId() ) == 1 } if (selfChange || uris.contains(unlockIntentUri)) { requestActiveUnlockOnUnlockIntent = secureSettings.getIntForUser( ACTIVE_UNLOCK_ON_UNLOCK_INTENT, 0, Loading Loading @@ -257,7 +276,7 @@ class ActiveUnlockConfig @Inject constructor( */ fun isActiveUnlockEnabled(): Boolean { return requestActiveUnlockOnWakeup || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnBioFail requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntentLegacy } /** Loading Loading @@ -299,15 +318,18 @@ class ActiveUnlockConfig @Inject constructor( fun shouldAllowActiveUnlockFromOrigin(requestOrigin: ActiveUnlockRequestOrigin): Boolean { return when (requestOrigin) { ActiveUnlockRequestOrigin.WAKE -> requestActiveUnlockOnWakeup ActiveUnlockRequestOrigin.UNLOCK_INTENT_LEGACY -> requestActiveUnlockOnUnlockIntentLegacy ActiveUnlockRequestOrigin.UNLOCK_INTENT -> requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnWakeup || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnUnlockIntentLegacy || requestActiveUnlockOnWakeup || (shouldRequestActiveUnlockOnUnlockIntentFromBiometricEnrollment()) ActiveUnlockRequestOrigin.BIOMETRIC_FAIL -> requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntentLegacy || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnWakeup ActiveUnlockRequestOrigin.ASSISTANT -> isActiveUnlockEnabled() } } Loading Loading @@ -345,6 +367,9 @@ class ActiveUnlockConfig @Inject constructor( override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("Settings:") pw.println(" requestActiveUnlockOnWakeup=$requestActiveUnlockOnWakeup") pw.println( " requestActiveUnlockOnUnlockIntentLegacy=$requestActiveUnlockOnUnlockIntentLegacy" ) pw.println(" requestActiveUnlockOnUnlockIntent=$requestActiveUnlockOnUnlockIntent") pw.println(" requestActiveUnlockOnBioFail=$requestActiveUnlockOnBioFail") Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard mDeviceEntryFaceAuthInteractor.onSwipeUpOnBouncer(); if (mDeviceEntryFaceAuthInteractor.isFaceAuthEnabledAndEnrolled()) { mUpdateMonitor.requestActiveUnlock( ActiveUnlockConfig.ActiveUnlockRequestOrigin.UNLOCK_INTENT, ActiveUnlockConfig.ActiveUnlockRequestOrigin.UNLOCK_INTENT_LEGACY, "swipeUpOnBouncer"); } } Loading Loading
core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -11071,6 +11071,13 @@ public final class Settings { public static final String ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL = "active_unlock_on_biometric_fail"; /** * Whether or not active unlock triggers on legacy unlock intents. * @hide */ public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY = "active_unlock_on_unlock_intent_legacy"; /** * If active unlock triggers on biometric failures, include the following error codes * as a biometric failure. See {@link android.hardware.biometrics.BiometricFaceConstants}. Loading
packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class SecureSettings { Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED, Settings.Secure.ACTIVE_UNLOCK_ON_WAKE, Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT, Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL, Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS, Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO, Loading
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_WAKE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED, Loading
packages/SystemUI/src/com/android/keyguard/ActiveUnlockConfig.kt +33 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED import android.provider.Settings.Secure.ACTIVE_UNLOCK_ON_WAKE import android.provider.Settings.Secure.ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS Loading Loading @@ -86,6 +87,12 @@ class ActiveUnlockConfig @Inject constructor( * Trigger ActiveUnlock when the assistant is triggered. */ ASSISTANT, /** * Trigger ActiveUnlock on legacy unlock intents. This includes tapping on the empty space * of the notification shadse when face auth is enrolled and re-trying face auth on the * primary bouncer. */ UNLOCK_INTENT_LEGACY, } /** Loading @@ -99,6 +106,7 @@ class ActiveUnlockConfig @Inject constructor( } private var requestActiveUnlockOnWakeup = false private var requestActiveUnlockOnUnlockIntentLegacy = false private var requestActiveUnlockOnUnlockIntent = false private var requestActiveUnlockOnBioFail = false Loading @@ -110,6 +118,8 @@ class ActiveUnlockConfig @Inject constructor( private val settingsObserver = object : ContentObserver(handler) { private val wakeUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_WAKE) private val unlockIntentLegacyUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY) private val unlockIntentUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_UNLOCK_INTENT) private val bioFailUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL) private val faceErrorsUri = secureSettings.getUriFor(ACTIVE_UNLOCK_ON_FACE_ERRORS) Loading Loading @@ -164,6 +174,15 @@ class ActiveUnlockConfig @Inject constructor( ACTIVE_UNLOCK_ON_WAKE, 0, selectedUserInteractor.getSelectedUserId()) == 1 } if (selfChange || uris.contains(unlockIntentLegacyUri)) { requestActiveUnlockOnUnlockIntentLegacy = secureSettings.getIntForUser( ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY, 0, selectedUserInteractor.getSelectedUserId() ) == 1 } if (selfChange || uris.contains(unlockIntentUri)) { requestActiveUnlockOnUnlockIntent = secureSettings.getIntForUser( ACTIVE_UNLOCK_ON_UNLOCK_INTENT, 0, Loading Loading @@ -257,7 +276,7 @@ class ActiveUnlockConfig @Inject constructor( */ fun isActiveUnlockEnabled(): Boolean { return requestActiveUnlockOnWakeup || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnBioFail requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntentLegacy } /** Loading Loading @@ -299,15 +318,18 @@ class ActiveUnlockConfig @Inject constructor( fun shouldAllowActiveUnlockFromOrigin(requestOrigin: ActiveUnlockRequestOrigin): Boolean { return when (requestOrigin) { ActiveUnlockRequestOrigin.WAKE -> requestActiveUnlockOnWakeup ActiveUnlockRequestOrigin.UNLOCK_INTENT_LEGACY -> requestActiveUnlockOnUnlockIntentLegacy ActiveUnlockRequestOrigin.UNLOCK_INTENT -> requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnWakeup || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnUnlockIntentLegacy || requestActiveUnlockOnWakeup || (shouldRequestActiveUnlockOnUnlockIntentFromBiometricEnrollment()) ActiveUnlockRequestOrigin.BIOMETRIC_FAIL -> requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnBioFail || requestActiveUnlockOnUnlockIntentLegacy || requestActiveUnlockOnUnlockIntent || requestActiveUnlockOnWakeup ActiveUnlockRequestOrigin.ASSISTANT -> isActiveUnlockEnabled() } } Loading Loading @@ -345,6 +367,9 @@ class ActiveUnlockConfig @Inject constructor( override fun dump(pw: PrintWriter, args: Array<out String>) { pw.println("Settings:") pw.println(" requestActiveUnlockOnWakeup=$requestActiveUnlockOnWakeup") pw.println( " requestActiveUnlockOnUnlockIntentLegacy=$requestActiveUnlockOnUnlockIntentLegacy" ) pw.println(" requestActiveUnlockOnUnlockIntent=$requestActiveUnlockOnUnlockIntent") pw.println(" requestActiveUnlockOnBioFail=$requestActiveUnlockOnBioFail") Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard mDeviceEntryFaceAuthInteractor.onSwipeUpOnBouncer(); if (mDeviceEntryFaceAuthInteractor.isFaceAuthEnabledAndEnrolled()) { mUpdateMonitor.requestActiveUnlock( ActiveUnlockConfig.ActiveUnlockRequestOrigin.UNLOCK_INTENT, ActiveUnlockConfig.ActiveUnlockRequestOrigin.UNLOCK_INTENT_LEGACY, "swipeUpOnBouncer"); } } Loading