Merge "Fixed face enroll intro button issue" into sc-v2-dev

This commit is contained in:
Joshua Mccloskey
2021-12-01 23:08:49 +00:00
committed by Android (Google) Code Review

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) {