Loading packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt +6 −6 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ constructor( } when (kind) { is PromptKind.Biometric -> is PromptKind.Biometric -> { BiometricPromptRequest.Biometric( info = promptInfo, userInfo = Loading @@ -189,6 +189,7 @@ constructor( }, opPackageName = opPackageName, ) } else -> null } } Loading Loading @@ -296,7 +297,6 @@ constructor( override fun onSwitchToCredential() { _currentView.value = BiometricPromptView.CREDENTIAL val modalities: BiometricModalities = if (promptRepository.promptKind.value.isBiometric()) (promptRepository.promptKind.value as PromptKind.Biometric).activeModalities Loading Loading @@ -366,9 +366,6 @@ constructor( _currentView.value = BiometricPromptView.CREDENTIAL } } else if (Utils.isBiometricAllowed(promptInfo) || showBpWithoutIconForCredential) { if (updateView) { _currentView.value = BiometricPromptView.BIOMETRIC } // TODO(b/330908557): Subscribe to // displayStateInteractor.currentRotation.value.isDefaultOrientation() for checking // `isLandscape` after removing AuthContainerView. Loading @@ -386,11 +383,14 @@ constructor( } else { PromptKind.Biometric(modalities) } if (updateView) { _currentView.value = BiometricPromptView.BIOMETRIC } } else if (isDeviceCredentialAllowed(promptInfo)) { kind = getCredentialType(lockPatternUtils, effectiveUserId) if (updateView) { _currentView.value = BiometricPromptView.CREDENTIAL } kind = getCredentialType(lockPatternUtils, effectiveUserId) } promptRepository.setPrompt( Loading packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialPasswordViewBinder.kt +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ object CredentialPasswordViewBinder { 0, // flag ) host.onCredentialMatched(attestation, isAllowed) viewModel.resetAttestation() } else { passwordField.setText("") } Loading @@ -106,6 +107,7 @@ object CredentialPasswordViewBinder { 0, // flag ) host.onCredentialMatched(attestation) viewModel.resetAttestation() } else { passwordField.setText("") } Loading packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/CredentialViewModel.kt +4 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,10 @@ constructor( promptSelectorInteractor.onSwitchToAuth() } suspend fun resetAttestation() { _validatedAttestation.emit(null) } /** Check a PIN or password and update [validatedAttestation] or [remainingAttempts]. */ suspend fun checkCredential(text: CharSequence, header: CredentialHeaderViewModel) = checkCredential(promptCredentialInteractor.checkCredential(header.asRequest(), text = text)) Loading services/core/java/com/android/server/biometrics/AuthSession.java +2 −1 Original line number Diff line number Diff line Loading @@ -692,7 +692,8 @@ public final class AuthSession implements IBinder.DeathRecipient { return; } if (mState != STATE_AUTH_PAUSED && mState != STATE_SHOWING_DEVICE_CREDENTIAL) { if (mState != STATE_AUTH_PAUSED && mState != STATE_SHOWING_DEVICE_CREDENTIAL && mState != STATE_AUTH_STARTED_UI_SHOWING) { Slog.w(TAG, "onResumeAuthentication, state: " + mState); return; } Loading services/core/java/com/android/server/biometrics/PreAuthInfo.java +2 −1 Original line number Diff line number Diff line Loading @@ -284,7 +284,8 @@ class PreAuthInfo { sensor.impl.getLockoutModeForUser(userId); if (lockoutMode == LockoutTracker.LOCKOUT_TIMED) { return BIOMETRIC_LOCKOUT_TIMED; } else if (lockoutMode == LockoutTracker.LOCKOUT_PERMANENT) { } else if (lockoutMode == LockoutTracker.LOCKOUT_PERMANENT && !Flags.bpFallbackOptions()) { return BIOMETRIC_LOCKOUT_PERMANENT; } } catch (RemoteException e) { Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt +6 −6 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ constructor( } when (kind) { is PromptKind.Biometric -> is PromptKind.Biometric -> { BiometricPromptRequest.Biometric( info = promptInfo, userInfo = Loading @@ -189,6 +189,7 @@ constructor( }, opPackageName = opPackageName, ) } else -> null } } Loading Loading @@ -296,7 +297,6 @@ constructor( override fun onSwitchToCredential() { _currentView.value = BiometricPromptView.CREDENTIAL val modalities: BiometricModalities = if (promptRepository.promptKind.value.isBiometric()) (promptRepository.promptKind.value as PromptKind.Biometric).activeModalities Loading Loading @@ -366,9 +366,6 @@ constructor( _currentView.value = BiometricPromptView.CREDENTIAL } } else if (Utils.isBiometricAllowed(promptInfo) || showBpWithoutIconForCredential) { if (updateView) { _currentView.value = BiometricPromptView.BIOMETRIC } // TODO(b/330908557): Subscribe to // displayStateInteractor.currentRotation.value.isDefaultOrientation() for checking // `isLandscape` after removing AuthContainerView. Loading @@ -386,11 +383,14 @@ constructor( } else { PromptKind.Biometric(modalities) } if (updateView) { _currentView.value = BiometricPromptView.BIOMETRIC } } else if (isDeviceCredentialAllowed(promptInfo)) { kind = getCredentialType(lockPatternUtils, effectiveUserId) if (updateView) { _currentView.value = BiometricPromptView.CREDENTIAL } kind = getCredentialType(lockPatternUtils, effectiveUserId) } promptRepository.setPrompt( Loading
packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialPasswordViewBinder.kt +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ object CredentialPasswordViewBinder { 0, // flag ) host.onCredentialMatched(attestation, isAllowed) viewModel.resetAttestation() } else { passwordField.setText("") } Loading @@ -106,6 +107,7 @@ object CredentialPasswordViewBinder { 0, // flag ) host.onCredentialMatched(attestation) viewModel.resetAttestation() } else { passwordField.setText("") } Loading
packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/CredentialViewModel.kt +4 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,10 @@ constructor( promptSelectorInteractor.onSwitchToAuth() } suspend fun resetAttestation() { _validatedAttestation.emit(null) } /** Check a PIN or password and update [validatedAttestation] or [remainingAttempts]. */ suspend fun checkCredential(text: CharSequence, header: CredentialHeaderViewModel) = checkCredential(promptCredentialInteractor.checkCredential(header.asRequest(), text = text)) Loading
services/core/java/com/android/server/biometrics/AuthSession.java +2 −1 Original line number Diff line number Diff line Loading @@ -692,7 +692,8 @@ public final class AuthSession implements IBinder.DeathRecipient { return; } if (mState != STATE_AUTH_PAUSED && mState != STATE_SHOWING_DEVICE_CREDENTIAL) { if (mState != STATE_AUTH_PAUSED && mState != STATE_SHOWING_DEVICE_CREDENTIAL && mState != STATE_AUTH_STARTED_UI_SHOWING) { Slog.w(TAG, "onResumeAuthentication, state: " + mState); return; } Loading
services/core/java/com/android/server/biometrics/PreAuthInfo.java +2 −1 Original line number Diff line number Diff line Loading @@ -284,7 +284,8 @@ class PreAuthInfo { sensor.impl.getLockoutModeForUser(userId); if (lockoutMode == LockoutTracker.LOCKOUT_TIMED) { return BIOMETRIC_LOCKOUT_TIMED; } else if (lockoutMode == LockoutTracker.LOCKOUT_PERMANENT) { } else if (lockoutMode == LockoutTracker.LOCKOUT_PERMANENT && !Flags.bpFallbackOptions()) { return BIOMETRIC_LOCKOUT_PERMANENT; } } catch (RemoteException e) { Loading