Skip to content

Commit 1ac44eb

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Don't hide the PIN keyboard even when a physical keyboard is present." into jb-mr1-dev
2 parents 5d75052 + ac8f575 commit 1ac44eb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public class KeyguardPasswordView extends LinearLayout
6868
// any passwords with length less than or equal to this length.
6969
private static final int MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT = 3;
7070

71+
// Enable this if we want to hide the on-screen PIN keyboard when a physical one is showing
72+
private static final boolean ENABLE_HIDE_KEYBOARD = false;
73+
7174
public KeyguardPasswordView(Context context) {
7275
super(context);
7376
}
@@ -123,10 +126,13 @@ protected void onFinishInflate() {
123126
mKeyboardHelper.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA);
124127
mKeyboardView.setVisibility(View.GONE);
125128
} else {
126-
// Use lockscreen's numeric keyboard if the physical keyboard isn't showing
127129
mKeyboardHelper.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
128-
mKeyboardView.setVisibility(getResources().getConfiguration().hardKeyboardHidden
129-
== Configuration.HARDKEYBOARDHIDDEN_NO ? View.INVISIBLE : View.VISIBLE);
130+
131+
// Use lockscreen's numeric keyboard if the physical keyboard isn't showing
132+
boolean hardKeyboardVisible = getResources().getConfiguration().hardKeyboardHidden
133+
== Configuration.HARDKEYBOARDHIDDEN_NO;
134+
mKeyboardView.setVisibility(
135+
(ENABLE_HIDE_KEYBOARD && hardKeyboardVisible) ? View.INVISIBLE : View.VISIBLE);
130136

131137
// The delete button is of the PIN keyboard itself in some (e.g. tablet) layouts,
132138
// not a separate view

0 commit comments

Comments
 (0)