Loading packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialPasswordViewBinder.kt +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ object CredentialPasswordViewBinder { // the header info never changes - do it early val header = viewModel.header.first() passwordField.setTextOperationUser(UserHandle.of(header.user.userIdForPasswordEntry)) viewModel.inputBoxContentDescription.firstOrNull()?.let { descriptionId -> passwordField.contentDescription = view.context.getString(descriptionId) } viewModel.inputFlags.firstOrNull()?.let { flags -> passwordField.inputType = flags } if (requestFocusForInput) { passwordField.requestFocus() Loading packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/CredentialViewModel.kt +11 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,17 @@ constructor( } } /** Input box accessibility description for text based credential views */ val inputBoxContentDescription: Flow<Int?> = credentialInteractor.prompt.map { when (it) { is BiometricPromptRequest.Credential.Pin -> R.string.keyguard_accessibility_pin_area is BiometricPromptRequest.Credential.Password -> R.string.keyguard_accessibility_password else -> null } } /** If stealth mode is active (hide user credential input). */ val stealthMode: Flow<Boolean> = credentialInteractor.prompt.map { Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialPasswordViewBinder.kt +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ object CredentialPasswordViewBinder { // the header info never changes - do it early val header = viewModel.header.first() passwordField.setTextOperationUser(UserHandle.of(header.user.userIdForPasswordEntry)) viewModel.inputBoxContentDescription.firstOrNull()?.let { descriptionId -> passwordField.contentDescription = view.context.getString(descriptionId) } viewModel.inputFlags.firstOrNull()?.let { flags -> passwordField.inputType = flags } if (requestFocusForInput) { passwordField.requestFocus() Loading
packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/CredentialViewModel.kt +11 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,17 @@ constructor( } } /** Input box accessibility description for text based credential views */ val inputBoxContentDescription: Flow<Int?> = credentialInteractor.prompt.map { when (it) { is BiometricPromptRequest.Credential.Pin -> R.string.keyguard_accessibility_pin_area is BiometricPromptRequest.Credential.Password -> R.string.keyguard_accessibility_password else -> null } } /** If stealth mode is active (hide user credential input). */ val stealthMode: Flow<Boolean> = credentialInteractor.prompt.map { Loading