diff options
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt index fbc64708c3af..214420d45560 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt @@ -833,7 +833,7 @@ constructor( messageJob?.cancel() messageJob = null - if (helpMessage.isNotBlank()) { + if (helpMessage.isNotBlank() && needsUserConfirmation) { showHelp(helpMessage) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt index 512d946e92d5..534f25c33900 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt @@ -503,11 +503,13 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId) val shouldAnimateIconView by collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView) + val message by collectLastValue(kosmos.promptViewModel.message) verifyIconSize() kosmos.promptViewModel.showAuthenticated( modality = testCase.authenticatedModality, - dismissAfterDelay = DELAY + dismissAfterDelay = DELAY, + "TEST" ) if (testCase.isFingerprintOnly) { @@ -531,6 +533,7 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa assertThat(iconContentDescriptionId) .isEqualTo(R.string.biometric_dialog_face_icon_description_authenticated) assertThat(shouldAnimateIconView).isEqualTo(true) + assertThat(message).isEqualTo(PromptMessage.Empty) } } } |