Loading packages/SystemUI/res/values/strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -303,6 +303,8 @@ <string name="biometric_dialog_face_icon_description_authenticated">Face authenticated</string> <string name="biometric_dialog_face_icon_description_authenticated">Face authenticated</string> <!-- Content description for the face icon when the user has been authenticated and the confirm button has been pressed [CHAR LIMIT=NONE] --> <!-- Content description for the face icon when the user has been authenticated and the confirm button has been pressed [CHAR LIMIT=NONE] --> <string name="biometric_dialog_face_icon_description_confirmed">Confirmed</string> <string name="biometric_dialog_face_icon_description_confirmed">Confirmed</string> <!-- Message shown when a biometric is authenticated, waiting for the user to confirm authentication [CHAR LIMIT=40]--> <string name="biometric_dialog_tap_confirm">Tap Confirm to complete</string> <!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication --> <!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication --> <string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string> <string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string> Loading packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java +21 −4 Original line number Original line Diff line number Diff line Loading @@ -59,6 +59,7 @@ public abstract class BiometricDialogView extends LinearLayout { private static final String KEY_TRY_AGAIN_VISIBILITY = "key_try_again_visibility"; private static final String KEY_TRY_AGAIN_VISIBILITY = "key_try_again_visibility"; private static final String KEY_CONFIRM_VISIBILITY = "key_confirm_visibility"; private static final String KEY_CONFIRM_VISIBILITY = "key_confirm_visibility"; private static final String KEY_CONFIRM_ENABLED = "key_confirm_enabled"; private static final String KEY_STATE = "key_state"; private static final String KEY_STATE = "key_state"; private static final String KEY_ERROR_TEXT_VISIBILITY = "key_error_text_visibility"; private static final String KEY_ERROR_TEXT_VISIBILITY = "key_error_text_visibility"; private static final String KEY_ERROR_TEXT_STRING = "key_error_text_string"; private static final String KEY_ERROR_TEXT_STRING = "key_error_text_string"; Loading Loading @@ -232,6 +233,10 @@ public abstract class BiometricDialogView extends LinearLayout { handleResetMessage(); handleResetMessage(); updateState(STATE_AUTHENTICATING); updateState(STATE_AUTHENTICATING); showTryAgainButton(false /* show */); showTryAgainButton(false /* show */); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(false); mCallback.onTryAgainPressed(); mCallback.onTryAgainPressed(); }); }); Loading @@ -243,6 +248,7 @@ public abstract class BiometricDialogView extends LinearLayout { public void onSaveState(Bundle bundle) { public void onSaveState(Bundle bundle) { bundle.putInt(KEY_TRY_AGAIN_VISIBILITY, mTryAgainButton.getVisibility()); bundle.putInt(KEY_TRY_AGAIN_VISIBILITY, mTryAgainButton.getVisibility()); bundle.putInt(KEY_CONFIRM_VISIBILITY, mPositiveButton.getVisibility()); bundle.putInt(KEY_CONFIRM_VISIBILITY, mPositiveButton.getVisibility()); bundle.putBoolean(KEY_CONFIRM_ENABLED, mPositiveButton.isEnabled()); bundle.putInt(KEY_STATE, mState); bundle.putInt(KEY_STATE, mState); bundle.putInt(KEY_ERROR_TEXT_VISIBILITY, mErrorText.getVisibility()); bundle.putInt(KEY_ERROR_TEXT_VISIBILITY, mErrorText.getVisibility()); bundle.putCharSequence(KEY_ERROR_TEXT_STRING, mErrorText.getText()); bundle.putCharSequence(KEY_ERROR_TEXT_STRING, mErrorText.getText()); Loading Loading @@ -275,9 +281,15 @@ public abstract class BiometricDialogView extends LinearLayout { if (mRestoredState == null) { if (mRestoredState == null) { updateState(STATE_AUTHENTICATING); updateState(STATE_AUTHENTICATING); mErrorText.setText(getHintStringResourceId()); final int hint = getHintStringResourceId(); mErrorText.setContentDescription(mContext.getString(getHintStringResourceId())); if (hint != 0) { mErrorText.setText(hint); mErrorText.setContentDescription(mContext.getString(hint)); mErrorText.setVisibility(View.VISIBLE); mErrorText.setVisibility(View.VISIBLE); } else { mErrorText.setVisibility(View.INVISIBLE); } announceAccessibilityEvent(); } else { } else { updateState(mState); updateState(mState); } } Loading Loading @@ -425,6 +437,7 @@ public abstract class BiometricDialogView extends LinearLayout { mErrorText.setText(message); mErrorText.setText(message); mErrorText.setTextColor(mErrorColor); mErrorText.setTextColor(mErrorColor); mErrorText.setContentDescription(message); mErrorText.setContentDescription(message); mErrorText.setVisibility(View.VISIBLE); mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_RESET_MESSAGE), mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_RESET_MESSAGE), BiometricPrompt.HIDE_DIALOG_DELAY); BiometricPrompt.HIDE_DIALOG_DELAY); } } Loading Loading @@ -458,7 +471,9 @@ public abstract class BiometricDialogView extends LinearLayout { public void updateState(int newState) { public void updateState(int newState) { if (newState == STATE_PENDING_CONFIRMATION) { if (newState == STATE_PENDING_CONFIRMATION) { mHandler.removeMessages(MSG_RESET_MESSAGE); mHandler.removeMessages(MSG_RESET_MESSAGE); mErrorText.setVisibility(View.INVISIBLE); mErrorText.setTextColor(mTextColor); mErrorText.setText(R.string.biometric_dialog_tap_confirm); mErrorText.setVisibility(View.VISIBLE); announceAccessibilityEvent(); announceAccessibilityEvent(); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(true); mPositiveButton.setEnabled(true); Loading Loading @@ -489,6 +504,8 @@ public abstract class BiometricDialogView extends LinearLayout { mTryAgainButton.setVisibility(tryAgainVisibility); mTryAgainButton.setVisibility(tryAgainVisibility); final int confirmVisibility = bundle.getInt(KEY_CONFIRM_VISIBILITY); final int confirmVisibility = bundle.getInt(KEY_CONFIRM_VISIBILITY); mPositiveButton.setVisibility(confirmVisibility); mPositiveButton.setVisibility(confirmVisibility); final boolean confirmEnabled = bundle.getBoolean(KEY_CONFIRM_ENABLED); mPositiveButton.setEnabled(confirmEnabled); mState = bundle.getInt(KEY_STATE); mState = bundle.getInt(KEY_STATE); mErrorText.setText(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setText(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setContentDescription(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setContentDescription(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); Loading packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java +3 −10 Original line number Original line Diff line number Diff line Loading @@ -289,16 +289,10 @@ public class FaceDialogView extends BiometricDialogView { @Override @Override protected void handleResetMessage() { protected void handleResetMessage() { mErrorText.setText(getHintStringResourceId()); mErrorText.setContentDescription(mContext.getString(getHintStringResourceId())); mErrorText.setTextColor(mTextColor); mErrorText.setTextColor(mTextColor); if (getState() == STATE_AUTHENTICATING) { mErrorText.setVisibility(View.VISIBLE); } else { mErrorText.setVisibility(View.INVISIBLE); mErrorText.setVisibility(View.INVISIBLE); announceAccessibilityEvent(); announceAccessibilityEvent(); } } } @Override @Override public void restoreState(Bundle bundle) { public void restoreState(Bundle bundle) { Loading Loading @@ -383,7 +377,7 @@ public class FaceDialogView extends BiometricDialogView { @Override @Override protected int getHintStringResourceId() { protected int getHintStringResourceId() { return R.string.face_dialog_looking_for_face; return 0; } } @Override @Override Loading @@ -408,7 +402,6 @@ public class FaceDialogView extends BiometricDialogView { mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); if (mDialogAnimatedIn) { if (mDialogAnimatedIn) { mIconController.startPulsing(); mIconController.startPulsing(); mErrorText.setVisibility(View.VISIBLE); } else { } else { mIconController.showIcon(R.drawable.face_dialog_pulse_dark_to_light); mIconController.showIcon(R.drawable.face_dialog_pulse_dark_to_light); } } Loading Loading
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -303,6 +303,8 @@ <string name="biometric_dialog_face_icon_description_authenticated">Face authenticated</string> <string name="biometric_dialog_face_icon_description_authenticated">Face authenticated</string> <!-- Content description for the face icon when the user has been authenticated and the confirm button has been pressed [CHAR LIMIT=NONE] --> <!-- Content description for the face icon when the user has been authenticated and the confirm button has been pressed [CHAR LIMIT=NONE] --> <string name="biometric_dialog_face_icon_description_confirmed">Confirmed</string> <string name="biometric_dialog_face_icon_description_confirmed">Confirmed</string> <!-- Message shown when a biometric is authenticated, waiting for the user to confirm authentication [CHAR LIMIT=40]--> <string name="biometric_dialog_tap_confirm">Tap Confirm to complete</string> <!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication --> <!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication --> <string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string> <string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string> Loading
packages/SystemUI/src/com/android/systemui/biometrics/BiometricDialogView.java +21 −4 Original line number Original line Diff line number Diff line Loading @@ -59,6 +59,7 @@ public abstract class BiometricDialogView extends LinearLayout { private static final String KEY_TRY_AGAIN_VISIBILITY = "key_try_again_visibility"; private static final String KEY_TRY_AGAIN_VISIBILITY = "key_try_again_visibility"; private static final String KEY_CONFIRM_VISIBILITY = "key_confirm_visibility"; private static final String KEY_CONFIRM_VISIBILITY = "key_confirm_visibility"; private static final String KEY_CONFIRM_ENABLED = "key_confirm_enabled"; private static final String KEY_STATE = "key_state"; private static final String KEY_STATE = "key_state"; private static final String KEY_ERROR_TEXT_VISIBILITY = "key_error_text_visibility"; private static final String KEY_ERROR_TEXT_VISIBILITY = "key_error_text_visibility"; private static final String KEY_ERROR_TEXT_STRING = "key_error_text_string"; private static final String KEY_ERROR_TEXT_STRING = "key_error_text_string"; Loading Loading @@ -232,6 +233,10 @@ public abstract class BiometricDialogView extends LinearLayout { handleResetMessage(); handleResetMessage(); updateState(STATE_AUTHENTICATING); updateState(STATE_AUTHENTICATING); showTryAgainButton(false /* show */); showTryAgainButton(false /* show */); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(false); mCallback.onTryAgainPressed(); mCallback.onTryAgainPressed(); }); }); Loading @@ -243,6 +248,7 @@ public abstract class BiometricDialogView extends LinearLayout { public void onSaveState(Bundle bundle) { public void onSaveState(Bundle bundle) { bundle.putInt(KEY_TRY_AGAIN_VISIBILITY, mTryAgainButton.getVisibility()); bundle.putInt(KEY_TRY_AGAIN_VISIBILITY, mTryAgainButton.getVisibility()); bundle.putInt(KEY_CONFIRM_VISIBILITY, mPositiveButton.getVisibility()); bundle.putInt(KEY_CONFIRM_VISIBILITY, mPositiveButton.getVisibility()); bundle.putBoolean(KEY_CONFIRM_ENABLED, mPositiveButton.isEnabled()); bundle.putInt(KEY_STATE, mState); bundle.putInt(KEY_STATE, mState); bundle.putInt(KEY_ERROR_TEXT_VISIBILITY, mErrorText.getVisibility()); bundle.putInt(KEY_ERROR_TEXT_VISIBILITY, mErrorText.getVisibility()); bundle.putCharSequence(KEY_ERROR_TEXT_STRING, mErrorText.getText()); bundle.putCharSequence(KEY_ERROR_TEXT_STRING, mErrorText.getText()); Loading Loading @@ -275,9 +281,15 @@ public abstract class BiometricDialogView extends LinearLayout { if (mRestoredState == null) { if (mRestoredState == null) { updateState(STATE_AUTHENTICATING); updateState(STATE_AUTHENTICATING); mErrorText.setText(getHintStringResourceId()); final int hint = getHintStringResourceId(); mErrorText.setContentDescription(mContext.getString(getHintStringResourceId())); if (hint != 0) { mErrorText.setText(hint); mErrorText.setContentDescription(mContext.getString(hint)); mErrorText.setVisibility(View.VISIBLE); mErrorText.setVisibility(View.VISIBLE); } else { mErrorText.setVisibility(View.INVISIBLE); } announceAccessibilityEvent(); } else { } else { updateState(mState); updateState(mState); } } Loading Loading @@ -425,6 +437,7 @@ public abstract class BiometricDialogView extends LinearLayout { mErrorText.setText(message); mErrorText.setText(message); mErrorText.setTextColor(mErrorColor); mErrorText.setTextColor(mErrorColor); mErrorText.setContentDescription(message); mErrorText.setContentDescription(message); mErrorText.setVisibility(View.VISIBLE); mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_RESET_MESSAGE), mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_RESET_MESSAGE), BiometricPrompt.HIDE_DIALOG_DELAY); BiometricPrompt.HIDE_DIALOG_DELAY); } } Loading Loading @@ -458,7 +471,9 @@ public abstract class BiometricDialogView extends LinearLayout { public void updateState(int newState) { public void updateState(int newState) { if (newState == STATE_PENDING_CONFIRMATION) { if (newState == STATE_PENDING_CONFIRMATION) { mHandler.removeMessages(MSG_RESET_MESSAGE); mHandler.removeMessages(MSG_RESET_MESSAGE); mErrorText.setVisibility(View.INVISIBLE); mErrorText.setTextColor(mTextColor); mErrorText.setText(R.string.biometric_dialog_tap_confirm); mErrorText.setVisibility(View.VISIBLE); announceAccessibilityEvent(); announceAccessibilityEvent(); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setVisibility(View.VISIBLE); mPositiveButton.setEnabled(true); mPositiveButton.setEnabled(true); Loading Loading @@ -489,6 +504,8 @@ public abstract class BiometricDialogView extends LinearLayout { mTryAgainButton.setVisibility(tryAgainVisibility); mTryAgainButton.setVisibility(tryAgainVisibility); final int confirmVisibility = bundle.getInt(KEY_CONFIRM_VISIBILITY); final int confirmVisibility = bundle.getInt(KEY_CONFIRM_VISIBILITY); mPositiveButton.setVisibility(confirmVisibility); mPositiveButton.setVisibility(confirmVisibility); final boolean confirmEnabled = bundle.getBoolean(KEY_CONFIRM_ENABLED); mPositiveButton.setEnabled(confirmEnabled); mState = bundle.getInt(KEY_STATE); mState = bundle.getInt(KEY_STATE); mErrorText.setText(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setText(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setContentDescription(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); mErrorText.setContentDescription(bundle.getCharSequence(KEY_ERROR_TEXT_STRING)); Loading
packages/SystemUI/src/com/android/systemui/biometrics/FaceDialogView.java +3 −10 Original line number Original line Diff line number Diff line Loading @@ -289,16 +289,10 @@ public class FaceDialogView extends BiometricDialogView { @Override @Override protected void handleResetMessage() { protected void handleResetMessage() { mErrorText.setText(getHintStringResourceId()); mErrorText.setContentDescription(mContext.getString(getHintStringResourceId())); mErrorText.setTextColor(mTextColor); mErrorText.setTextColor(mTextColor); if (getState() == STATE_AUTHENTICATING) { mErrorText.setVisibility(View.VISIBLE); } else { mErrorText.setVisibility(View.INVISIBLE); mErrorText.setVisibility(View.INVISIBLE); announceAccessibilityEvent(); announceAccessibilityEvent(); } } } @Override @Override public void restoreState(Bundle bundle) { public void restoreState(Bundle bundle) { Loading Loading @@ -383,7 +377,7 @@ public class FaceDialogView extends BiometricDialogView { @Override @Override protected int getHintStringResourceId() { protected int getHintStringResourceId() { return R.string.face_dialog_looking_for_face; return 0; } } @Override @Override Loading @@ -408,7 +402,6 @@ public class FaceDialogView extends BiometricDialogView { mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); mHandler.removeCallbacks(mErrorToIdleAnimationRunnable); if (mDialogAnimatedIn) { if (mDialogAnimatedIn) { mIconController.startPulsing(); mIconController.startPulsing(); mErrorText.setVisibility(View.VISIBLE); } else { } else { mIconController.showIcon(R.drawable.face_dialog_pulse_dark_to_light); mIconController.showIcon(R.drawable.face_dialog_pulse_dark_to_light); } } Loading