Loading packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -40,6 +40,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected SecurityMessageDisplay mSecurityMessageDisplay; protected SecurityMessageDisplay mSecurityMessageDisplay; protected View mEcaView; protected View mEcaView; protected boolean mEnableHaptics; protected boolean mEnableHaptics; private boolean mDismissing; // To avoid accidental lockout due to events while the device in in the pocket, ignore // To avoid accidental lockout due to events while the device in in the pocket, ignore // any passwords with length less than or equal to this length. // any passwords with length less than or equal to this length. Loading Loading @@ -67,6 +68,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout @Override @Override public void reset() { public void reset() { // start fresh // start fresh mDismissing = false; resetPasswordText(false /* animate */); resetPasswordText(false /* animate */); // if the user is currently locked out, enforce it. // if the user is currently locked out, enforce it. long deadline = mLockPatternUtils.getLockoutAttemptDeadline( long deadline = mLockPatternUtils.getLockoutAttemptDeadline( Loading Loading @@ -113,6 +115,8 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout } } protected void verifyPasswordAndUnlock() { protected void verifyPasswordAndUnlock() { if (mDismissing) return; // already verified but haven't been dismissed; don't do it again. final String entry = getPasswordText(); final String entry = getPasswordText(); setPasswordEntryInputEnabled(false); setPasswordEntryInputEnabled(false); if (mPendingLockCheck != null) { if (mPendingLockCheck != null) { Loading Loading @@ -143,6 +147,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) { private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) { if (matched) { if (matched) { mDismissing = true; mCallback.reportUnlockAttempt(true, 0); mCallback.reportUnlockAttempt(true, 0); mCallback.dismiss(true); mCallback.dismiss(true); } else { } else { Loading packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView return mPasswordEntry.requestFocus(direction, previouslyFocusedRect); return mPasswordEntry.requestFocus(direction, previouslyFocusedRect); } } @Override protected void resetState() { protected void resetState() { mPasswordEntry.setEnabled(true); mPasswordEntry.setEnabled(true); } } Loading @@ -69,11 +70,13 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView @Override @Override protected void setPasswordEntryEnabled(boolean enabled) { protected void setPasswordEntryEnabled(boolean enabled) { mPasswordEntry.setEnabled(enabled); mPasswordEntry.setEnabled(enabled); mOkButton.setEnabled(enabled); } } @Override @Override protected void setPasswordEntryInputEnabled(boolean enabled) { protected void setPasswordEntryInputEnabled(boolean enabled) { mPasswordEntry.setEnabled(enabled); mPasswordEntry.setEnabled(enabled); mOkButton.setEnabled(enabled); } } @Override @Override Loading Loading @@ -186,6 +189,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView mDeleteButton = findViewById(R.id.delete_button); mDeleteButton = findViewById(R.id.delete_button); mDeleteButton.setVisibility(View.VISIBLE); mDeleteButton.setVisibility(View.VISIBLE); mDeleteButton.setOnClickListener(new OnClickListener() { mDeleteButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { public void onClick(View v) { // check for time-based lockouts // check for time-based lockouts if (mPasswordEntry.isEnabled()) { if (mPasswordEntry.isEnabled()) { Loading @@ -195,6 +199,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView } } }); }); mDeleteButton.setOnLongClickListener(new View.OnLongClickListener() { mDeleteButton.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { public boolean onLongClick(View v) { // check for time-based lockouts // check for time-based lockouts if (mPasswordEntry.isEnabled()) { if (mPasswordEntry.isEnabled()) { Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -40,6 +40,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout protected SecurityMessageDisplay mSecurityMessageDisplay; protected SecurityMessageDisplay mSecurityMessageDisplay; protected View mEcaView; protected View mEcaView; protected boolean mEnableHaptics; protected boolean mEnableHaptics; private boolean mDismissing; // To avoid accidental lockout due to events while the device in in the pocket, ignore // To avoid accidental lockout due to events while the device in in the pocket, ignore // any passwords with length less than or equal to this length. // any passwords with length less than or equal to this length. Loading Loading @@ -67,6 +68,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout @Override @Override public void reset() { public void reset() { // start fresh // start fresh mDismissing = false; resetPasswordText(false /* animate */); resetPasswordText(false /* animate */); // if the user is currently locked out, enforce it. // if the user is currently locked out, enforce it. long deadline = mLockPatternUtils.getLockoutAttemptDeadline( long deadline = mLockPatternUtils.getLockoutAttemptDeadline( Loading Loading @@ -113,6 +115,8 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout } } protected void verifyPasswordAndUnlock() { protected void verifyPasswordAndUnlock() { if (mDismissing) return; // already verified but haven't been dismissed; don't do it again. final String entry = getPasswordText(); final String entry = getPasswordText(); setPasswordEntryInputEnabled(false); setPasswordEntryInputEnabled(false); if (mPendingLockCheck != null) { if (mPendingLockCheck != null) { Loading Loading @@ -143,6 +147,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) { private void onPasswordChecked(boolean matched, int timeoutMs, boolean isValidPassword) { if (matched) { if (matched) { mDismissing = true; mCallback.reportUnlockAttempt(true, 0); mCallback.reportUnlockAttempt(true, 0); mCallback.dismiss(true); mCallback.dismiss(true); } else { } else { Loading
packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView return mPasswordEntry.requestFocus(direction, previouslyFocusedRect); return mPasswordEntry.requestFocus(direction, previouslyFocusedRect); } } @Override protected void resetState() { protected void resetState() { mPasswordEntry.setEnabled(true); mPasswordEntry.setEnabled(true); } } Loading @@ -69,11 +70,13 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView @Override @Override protected void setPasswordEntryEnabled(boolean enabled) { protected void setPasswordEntryEnabled(boolean enabled) { mPasswordEntry.setEnabled(enabled); mPasswordEntry.setEnabled(enabled); mOkButton.setEnabled(enabled); } } @Override @Override protected void setPasswordEntryInputEnabled(boolean enabled) { protected void setPasswordEntryInputEnabled(boolean enabled) { mPasswordEntry.setEnabled(enabled); mPasswordEntry.setEnabled(enabled); mOkButton.setEnabled(enabled); } } @Override @Override Loading Loading @@ -186,6 +189,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView mDeleteButton = findViewById(R.id.delete_button); mDeleteButton = findViewById(R.id.delete_button); mDeleteButton.setVisibility(View.VISIBLE); mDeleteButton.setVisibility(View.VISIBLE); mDeleteButton.setOnClickListener(new OnClickListener() { mDeleteButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { public void onClick(View v) { // check for time-based lockouts // check for time-based lockouts if (mPasswordEntry.isEnabled()) { if (mPasswordEntry.isEnabled()) { Loading @@ -195,6 +199,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView } } }); }); mDeleteButton.setOnLongClickListener(new View.OnLongClickListener() { mDeleteButton.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { public boolean onLongClick(View v) { // check for time-based lockouts // check for time-based lockouts if (mPasswordEntry.isEnabled()) { if (mPasswordEntry.isEnabled()) { Loading