summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang, ArvinX <arvinx.wang@intel.com>2018-09-13 03:17:55 (GMT)
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-07-27 20:57:26 (GMT)
commite18c1188eee6678c1301a9194dc6400a28ab69c6 (patch)
tree126c5951c189b29987dc97b10ecd785514fcfc2e
parent7042bf0420dcc4ca0380e6e1f4d786587e1ad0f2 (diff)
downloadframeworks_base-e18c1188eee6678c1301a9194dc6400a28ab69c6.zip
frameworks_base-e18c1188eee6678c1301a9194dc6400a28ab69c6.tar.gz
frameworks_base-e18c1188eee6678c1301a9194dc6400a28ab69c6.tar.bz2
Unable to input PIN with hardware keyboard
After typing a wrong PIN, the EditText view will be disabled and lose the focus, as a result, inputs from hardware keyboard won't be sent to PIN EditText. Test: 1. Enable PIN lock Test: 2. Lock the device with Power key Test: 3. Enter wrong PIN from a physical keyboard Test: 4. Try to enter PIN again with physical keyboard Bug: 119287260 Change-Id: I04df523c19c99bef75ea481b44154f7ba2270689 Signed-off-by: Wang, ArvinX <arvinx.wang@intel.com> Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
index cb8c119..f400f60 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
@@ -68,12 +68,18 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
protected void setPasswordEntryEnabled(boolean enabled) {
mPasswordEntry.setEnabled(enabled);
mOkButton.setEnabled(enabled);
+ if (enabled && !mPasswordEntry.hasFocus()) {
+ mPasswordEntry.requestFocus();
+ }
}
@Override
protected void setPasswordEntryInputEnabled(boolean enabled) {
mPasswordEntry.setEnabled(enabled);
mOkButton.setEnabled(enabled);
+ if (enabled && !mPasswordEntry.hasFocus()) {
+ mPasswordEntry.requestFocus();
+ }
}
@Override