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
This commit is contained in:
Joshua Mccloskey
2021-11-30 09:29:13 -08:00
parent 076dc5ee1b
commit 756fa20e1c

View File

@@ -203,11 +203,15 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
getMoreButtonTextRes(), this::onNextButtonClick);
requireScrollMixin.setOnRequireScrollStateChangedListener(
scrollNeeded -> {
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) {