Revert "Fix the 1st udfps#enroll#error always fill red color"

This reverts commit 84b498d48d.

Reason for revert: Introduce regression b/243906317

Change-Id: I88c5da6e4b6e0f05e250b185ac5d754eac911330
This commit is contained in:
Bill Lin
2022-09-05 06:48:28 +00:00
parent 84b498d48d
commit 9d546daf3c

View File

@@ -99,11 +99,12 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
mProgressColor = context.getColor(R.color.udfps_enroll_progress);
final AccessibilityManager am = context.getSystemService(AccessibilityManager.class);
mIsAccessibilityEnabled = am.isTouchExplorationEnabled();
mOnFirstBucketFailedColor = context.getColor(R.color.udfps_moving_target_fill_error);
if (!mIsAccessibilityEnabled) {
mHelpColor = context.getColor(R.color.udfps_enroll_progress_help);
mOnFirstBucketFailedColor = context.getColor(R.color.udfps_moving_target_fill_error);
} else {
mHelpColor = context.getColor(R.color.udfps_enroll_progress_help_with_talkback);
mOnFirstBucketFailedColor = mHelpColor;
}
mCheckmarkDrawable = context.getDrawable(R.drawable.udfps_enroll_checkmark);
mCheckmarkDrawable.mutate();
@@ -166,8 +167,7 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
}
private void updateProgress(int remainingSteps, int totalSteps, boolean showingHelp) {
if (mRemainingSteps == remainingSteps && mTotalSteps == totalSteps
&& mShowingHelp == showingHelp) {
if (mRemainingSteps == remainingSteps && mTotalSteps == totalSteps) {
return;
}
@@ -197,7 +197,6 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
}
}
mShowingHelp = showingHelp;
mRemainingSteps = remainingSteps;
mTotalSteps = totalSteps;