From 756fa20e1ce86dc1fa0ef72b8782b8486d3882bb Mon Sep 17 00:00:00 2001 From: Joshua Mccloskey Date: Tue, 30 Nov 2021 09:29:13 -0800 Subject: [PATCH] Fixed face enroll intro button issue Fixed an issue where sometimes after completing face authentication the more & agree buttons would display instead of the done button. 1. Enter SUW 2. Complete face authentication flow 3. Go to next step (finishing the Biometric flow) 4. Press the back button 5. Observe that the text now says "Done" Fixes: 205203673 Test: Verified button text is changed as expected during SUW. Change-Id: I5cfad265f9b27669dcad64e5872750695b1b5bdc --- .../biometrics/BiometricEnrollIntroduction.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java index f80b01f39c3..7f3bc87aaec 100644 --- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java +++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java @@ -203,11 +203,15 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase getMoreButtonTextRes(), this::onNextButtonClick); requireScrollMixin.setOnRequireScrollStateChangedListener( scrollNeeded -> { - // Update text of primary button from "More" to "Agree". - final int primaryButtonTextRes = scrollNeeded - ? getMoreButtonTextRes() - : getAgreeButtonTextRes(); - getPrimaryFooterButton().setText(this, primaryButtonTextRes); + + boolean enrollmentCompleted = checkMaxEnrolled() != 0; + if (!enrollmentCompleted) { + // Update text of primary button from "More" to "Agree". + final int primaryButtonTextRes = scrollNeeded + ? getMoreButtonTextRes() + : getAgreeButtonTextRes(); + getPrimaryFooterButton().setText(this, primaryButtonTextRes); + } // Show secondary button once scroll is completed. if (!scrollNeeded) {