Skip to content

Commit 11dea4d

Browse files
Adam CohenAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue where pin field doesn't have focus (issue 7348937)" into jb-mr1-dev
2 parents f2e28ab + ac8a59d commit 11dea4d

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)