summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
index 929258d..3fcc3c3 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.graphics.Rect;
import android.text.Editable;
import android.text.InputType;
+import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.TextKeyListener;
import android.util.AttributeSet;
@@ -138,20 +139,6 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
// Set selected property on so the view can send accessibility events.
mPasswordEntry.setSelected(true);
- mPasswordEntry.addTextChangedListener(new TextWatcher() {
- public void onTextChanged(CharSequence s, int start, int before, int count) {
- }
-
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
- }
-
- public void afterTextChanged(Editable s) {
- if (mCallback != null) {
- mCallback.userActivity();
- }
- }
- });
-
mPasswordEntry.requestFocus();
// If there's more than one IME, enable the IME switcher button
@@ -293,6 +280,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
@Override
public void afterTextChanged(Editable s) {
+ // Poor man's user edit detection, assuming empty text is programmatic and everything else
+ // is from the user.
+ if (!TextUtils.isEmpty(s)) {
+ onUserInput();
+ }
}
@Override