Merge "Make sure biometric icon ends in authenticated state" into qt-dev

This commit is contained in:
Kevin Chyn
2019-04-12 01:22:54 +00:00
committed by Android (Google) Code Review
3 changed files with 15 additions and 1 deletions

View File

@@ -308,7 +308,7 @@ public abstract class BiometricDialogView extends LinearLayout {
protected void updateIcon(int lastState, int newState) { protected void updateIcon(int lastState, int newState) {
final Drawable icon = getAnimationForTransition(lastState, newState); final Drawable icon = getAnimationForTransition(lastState, newState);
if (icon == null) { if (icon == null) {
Log.e(TAG, "Animation not found"); Log.e(TAG, "Animation not found, " + lastState + " -> " + newState);
return; return;
} }

View File

@@ -330,6 +330,10 @@ public class FaceDialogView extends BiometricDialogView {
return true; return true;
} else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) { } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
return true; return true;
} else if (oldState == STATE_ERROR && newState == STATE_PENDING_CONFIRMATION) {
return true;
} else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) {
return true;
} }
return false; return false;
} }
@@ -364,6 +368,10 @@ public class FaceDialogView extends BiometricDialogView {
iconRes = R.drawable.face_dialog_face_blue_to_checkmark; iconRes = R.drawable.face_dialog_face_blue_to_checkmark;
} else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) { } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
iconRes = R.drawable.face_dialog_face_gray_to_checkmark; iconRes = R.drawable.face_dialog_face_gray_to_checkmark;
} else if (oldState == STATE_ERROR && newState == STATE_PENDING_CONFIRMATION) {
iconRes = R.drawable.face_dialog_face_gray_to_face_blue;
} else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) {
iconRes = R.drawable.face_dialog_face_blue_to_checkmark;
} else { } else {
return null; return null;
} }

View File

@@ -66,6 +66,9 @@ public class FingerprintDialogView extends BiometricDialogView {
} else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) { } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
// TODO(b/77328470): add animation when fingerprint is authenticated // TODO(b/77328470): add animation when fingerprint is authenticated
return false; return false;
} else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) {
// TODO(b/77328470): add animation when fingerprint is authenticated
return false;
} }
return false; return false;
} }
@@ -93,6 +96,9 @@ public class FingerprintDialogView extends BiometricDialogView {
} else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) { } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
// TODO(b/77328470): add animation when fingerprint is authenticated // TODO(b/77328470): add animation when fingerprint is authenticated
iconRes = R.drawable.fingerprint_dialog_fp_to_error; iconRes = R.drawable.fingerprint_dialog_fp_to_error;
} else if (oldState == STATE_ERROR && newState == STATE_AUTHENTICATED) {
// TODO(b/77328470): add animation when fingerprint is authenticated
iconRes = R.drawable.fingerprint_dialog_fp_to_error;
} else { } else {
return null; return null;
} }