Merge "Fix alignment of finger animation with progress bar"

This commit is contained in:
Grace Cheng
2022-09-21 20:32:06 +00:00
committed by Android (Google) Code Review
5 changed files with 15 additions and 6 deletions

View File

@@ -316,6 +316,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
mFastOutLinearInInterpolator = AnimationUtils.loadInterpolator(
this, android.R.interpolator.fast_out_linear_in);
if (mProgressBar != null) {
mProgressBar.setProgressBackgroundTintMode(PorterDuff.Mode.SRC);
mProgressBar.setOnTouchListener((v, event) -> {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
mIconTouchCount++;
@@ -889,7 +890,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
ColorStateList fillColor = ColorStateList.valueOf(
isError ? error_color : progress_bar_fill_color);
mProgressBar.setProgressTintList(fillColor);
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC_ATOP);
mProgressBar.setProgressTintMode(PorterDuff.Mode.SRC);
mProgressBar.invalidate();
}
}