Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84b498d4 authored by Bill Lin's avatar Bill Lin
Browse files

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

Test: Enable talkback
      Verified animation fades in/out on enrollment error.
Bug: 236801782
Change-Id: I6c9633f54cbf0e208c9ac43d749aec032c1a5ae1
parent 9ef43b2f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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();
@@ -167,7 +166,8 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
    }

    private void updateProgress(int remainingSteps, int totalSteps, boolean showingHelp) {
        if (mRemainingSteps == remainingSteps && mTotalSteps == totalSteps) {
        if (mRemainingSteps == remainingSteps && mTotalSteps == totalSteps
                && mShowingHelp == showingHelp) {
            return;
        }

@@ -197,6 +197,7 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable {
            }
        }

        mShowingHelp = showingHelp;
        mRemainingSteps = remainingSteps;
        mTotalSteps = totalSteps;