/** {@inheritDoc} */ public void onResume() { // reset status mKeyguardStatusViewManager.onResume(); // reset lock pattern mLockPatternView.enableInput(); mLockPatternView.setEnabled(true); mLockPatternView.clearPattern(); // show "forgot pattern?" button if we have an alternate authentication method if (mCallback.doesFallbackUnlockScreenExist()) { showForgotPatternButton(); } else { hideForgotPatternButton(); } // if the user is currently locked out, enforce it. long deadline = mLockPatternUtils.getLockoutAttemptDeadline(); if (deadline != 0) { handleAttemptLockout(deadline); } // the footer depends on how many total attempts the user has failed if (mCallback.isVerifyUnlockOnly()) { updateFooter(FooterMode.VerifyUnlocked); } else if (mEnableFallback && (mTotalFailedPatternAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { updateFooter(FooterMode.ForgotLockPattern); } else { updateFooter(FooterMode.Normal); } }
/** {@inheritDoc} */ public void onPause() { if (mCountdownTimer != null) { mCountdownTimer.cancel(); mCountdownTimer = null; } mKeyguardStatusViewManager.onPause(); }
private void verifyPasswordAndUnlock() { String entry = mPasswordEntry.getText().toString(); if (mLockPatternUtils.checkPassword(entry)) { mCallback.keyguardDone(true); mCallback.reportSuccessfulUnlockAttempt(); mStatusViewManager.setInstructionText(null); KeyStore.getInstance().password(entry); } else if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT) { // to avoid accidental lockout, only count attempts that are long enough to be a // real password. This may require some tweaking. mCallback.reportFailedUnlockAttempt(); if (0 == (mUpdateMonitor.getFailedAttempts() % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) { long deadline = mLockPatternUtils.setLockoutAttemptDeadline(); handleAttemptLockout(deadline); } mStatusViewManager.setInstructionText(mContext.getString(R.string.lockscreen_password_wrong)); } else if (entry.length() > 0) { mStatusViewManager.setInstructionText(mContext.getString(R.string.lockscreen_password_wrong)); } mPasswordEntry.setText(""); }
/** {@inheritDoc} */ public void onResume() { mResuming = true; // reset status mStatusViewManager.onResume(); // start fresh mPasswordEntry.setText(""); mPasswordEntry.requestFocus(); // if the user is currently locked out, enforce it. long deadline = mLockPatternUtils.getLockoutAttemptDeadline(); if (deadline != 0) { handleAttemptLockout(deadline); } mResuming = false; }
/** {@inheritDoc} */ public void onPause() { mStatusViewManager.onPause(); }
/** {@inheritDoc} */ public void onResume() { mStatusViewManager.onResume(); postDelayed(mOnResumePing, ON_RESUME_PING_DELAY); }
/** {@inheritDoc} */ public void onPause() { mStatusViewManager.onPause(); mUnlockWidgetMethods.reset(false); }