Show "no thanks" button when scroll is not needed.

Test: atest FingerprintEnrollIntroductionTest
Bug: 328019857
Change-Id: Ia9e9be3a5a4c89e1d01e597730da5bfc2a5483ad
This commit is contained in:
Hao Dong
2024-04-03 20:44:16 +00:00
parent 4e32375f3d
commit 6cef7bac2d
3 changed files with 99 additions and 23 deletions

View File

@@ -229,13 +229,15 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
}
// Show secondary button once scroll is completed.
if (!scrollNeeded) {
if (!enrollmentCompleted) {
getSecondaryFooterButton().setVisibility(View.VISIBLE);
}
mHasScrolledToBottom = true;
}
getSecondaryFooterButton().setVisibility(
!scrollNeeded && !enrollmentCompleted ? View.VISIBLE : View.INVISIBLE);
mHasScrolledToBottom = !scrollNeeded;
});
final boolean isScrollNeeded = requireScrollMixin.isScrollingRequired();
final boolean enrollmentCompleted = checkMaxEnrolled() != 0;
getSecondaryFooterButton().setVisibility(
!isScrollNeeded && !enrollmentCompleted ? View.VISIBLE : View.INVISIBLE);
}
@Override