File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
policy/src/com/android/internal/policy/impl/keyguard Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments