Clear FP error only on progress.

Test: Manually verified progress is cleared only
when the user makes progress on fp enrollment.
Fixes: 234094887

Change-Id: I173d2edb94132a4f68e0ef90aa9fa8008a25236f
This commit is contained in:
Joshua McCloskey
2022-06-02 22:55:53 +00:00
committed by Joshua Mccloskey
parent 539565473e
commit 28c0d90491

View File

@@ -508,7 +508,6 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
public void onEnrollmentProgressChange(int steps, int remaining) { public void onEnrollmentProgressChange(int steps, int remaining) {
updateProgress(true /* animate */); updateProgress(true /* animate */);
updateTitleAndDescription(); updateTitleAndDescription();
clearError();
animateFlash(); animateFlash();
if (!mCanAssumeUdfps) { if (!mCanAssumeUdfps) {
mErrorText.removeCallbacks(mTouchAgainRunnable); mErrorText.removeCallbacks(mTouchAgainRunnable);
@@ -537,6 +536,11 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
int progress = getProgress( int progress = getProgress(
mSidecar.getEnrollmentSteps(), mSidecar.getEnrollmentRemaining()); mSidecar.getEnrollmentSteps(), mSidecar.getEnrollmentRemaining());
// Only clear the error when progress has been made.
// TODO (b/234772728) Add tests.
if (mProgressBar != null && mProgressBar.getProgress() < progress) {
clearError();
}
if (animate) { if (animate) {
animateProgress(progress); animateProgress(progress);
} else { } else {