mLockPatternView.clearPattern();
break;
case NeedToUnlockWrong:
- mErrorTextView.setText(R.string.lockpattern_need_to_unlock_wrong);
+ showError(R.string.lockpattern_need_to_unlock_wrong);
mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong);
mLockPatternView.setEnabled(true);
}
};
-
private void handleAttemptLockout(long elapsedRealtimeDeadline) {
updateStage(Stage.LockedOut);
long elapsedRealtime = SystemClock.elapsedRealtime();
@Override
public void onTick(long millisUntilFinished) {
final int secondsCountdown = (int) (millisUntilFinished / 1000);
- mErrorTextView.setText(getString(
+ showError(getString(
R.string.lockpattern_too_many_failed_confirmation_attempts,
secondsCountdown));
}
}
}.start();
}
+
+ private void showError(CharSequence msg) {
+ mErrorTextView.setText(msg);
+ mErrorTextView.announceForAccessibility(mErrorTextView.getText());
+ }
+
+ private void showError(int msgid) {
+ showError(getText(msgid));
+ }
}
}