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

Test: Enable talkback
      Verify animation fades in/out on enrollment error.
Test: Verify when onError() callback, the next success capture
      should vibrate.
Bug: 236801782
Change-Id: I6c9633f54cbf0e208c9ac43d749aec032c1a5ae1
This commit is contained in:
Bill Lin
2022-07-19 16:19:54 +08:00
committed by lbill
parent 69e66c663d
commit f5a6b0cca0

View File

@@ -99,12 +99,11 @@ 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();
@@ -197,6 +196,7 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
}
}
mShowingHelp = showingHelp;
mRemainingSteps = remainingSteps;
mTotalSteps = totalSteps;