Skip to content

Commit ac8a59d

Browse files
author
Adam Cohen
committed
Fix issue where pin field doesn't have focus (issue 7348937)
Change-Id: Ia926765271251248701416c001e2e73131cdf4ad
1 parent a30d969 commit ac8a59d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardPasswordView.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ public void setLockPatternUtils(LockPatternUtils utils) {
8686
mLockPatternUtils = utils;
8787
}
8888

89+
@Override
90+
public void onWindowFocusChanged(boolean hasWindowFocus) {
91+
if (hasWindowFocus) {
92+
reset();
93+
}
94+
}
95+
8996
public void reset() {
9097
// start fresh
9198
mPasswordEntry.setText("");
@@ -191,7 +198,9 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
191198
}
192199

193200
public void afterTextChanged(Editable s) {
194-
mCallback.userActivity(0);
201+
if (mCallback != null) {
202+
mCallback.userActivity(0);
203+
}
195204
}
196205
});
197206

0 commit comments

Comments
 (0)