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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user