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

Commit a60118cf authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Handle [error->pending_confirmation] and [error->authenticated] animations

It's possible to go from error state to either of the onAuthenticated
states. Thus, initiate animation when that happens

Fixes: 132124967

Test: Modify code to coerce UI into bad state. Apply patch, bad state
      is not seen anymore

Change-Id: I34fbf0801721d57e509675a9b4ecc38ead143ba6
parent aae9d6c7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -402,6 +402,12 @@ public class FaceDialogView extends BiometricDialogView {
        } else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATING) {
            mHandler.removeCallbacks(mErrorToIdleAnimationRunnable);
            mIconController.startPulsing();
        } else if (oldState == STATE_ERROR && newState == STATE_PENDING_CONFIRMATION) {
            mHandler.removeCallbacks(mErrorToIdleAnimationRunnable);
            mIconController.animateOnce(R.drawable.face_dialog_wink_from_dark);
        } else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) {
            mHandler.removeCallbacks(mErrorToIdleAnimationRunnable);
            mIconController.animateOnce(R.drawable.face_dialog_dark_to_checkmark);
        } else if (oldState == STATE_AUTHENTICATING && newState == STATE_ERROR) {
            mIconController.animateOnce(R.drawable.face_dialog_dark_to_error);
            mHandler.postDelayed(mErrorToIdleAnimationRunnable, BiometricPrompt.HIDE_DIALOG_DELAY);