Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ea81037 authored by Steve Kondik's avatar Steve Kondik
Browse files

input: add workaround for broken hardware keyboard support



* add workaround var for devices with broken kernels

Signed-off-by: default avatarHumberto Borba <humberos@gmail.com>
Change-Id: I98b04c6906a0e7a1ad893b25d0377bf6df97f30c
parent 2296c2d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1711,6 +1711,9 @@
    <!-- Default Gravity setting for the system Toast view. Equivalent to: Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM -->
    <integer name="config_toastDefaultGravity">0x00000051</integer>

    <!-- Workaround for devices with broken keyboards -->
    <bool name="config_forceDisableHardwareKeyboard">false</bool>

    <!-- set to false if we need to show user confirmation
         when alpha identifier is not provided by the UICC -->
    <bool name="config_stkNoAlphaUsrCnf">true</bool>
+1 −0
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@
  <java-symbol type="bool" name="config_wifi_only_link_same_credential_configurations" />
  <java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />
  <java-symbol type="bool" name="config_wifi_enable_5GHz_preference" />
  <java-symbol type="bool" name="config_forceDisableHardwareKeyboard" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
+10 −1
Original line number Diff line number Diff line
@@ -616,6 +616,8 @@ public class WindowManagerService extends IWindowManager.Stub
    final DisplayManagerInternal mDisplayManagerInternal;
    final DisplayManager mDisplayManager;

    private boolean mForceDisableHardwareKeyboard = false;

    // Who is holding the screen on.
    Session mHoldingScreenOn;
    PowerManager.WakeLock mHoldingScreenWakeLock;
@@ -884,6 +886,9 @@ public class WindowManagerService extends IWindowManager.Stub

        mAnimator = new WindowAnimator(this);

        mForceDisableHardwareKeyboard = context.getResources().getBoolean(
                com.android.internal.R.bool.config_forceDisableHardwareKeyboard);

        LocalServices.addService(WindowManagerInternal.class, new LocalService());
        initPolicy();

@@ -7222,9 +7227,13 @@ public class WindowManagerService extends IWindowManager.Stub
            }

            // Determine whether a hard keyboard is available and enabled.
            boolean hardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
            boolean hardKeyboardAvailable = false;
            if (!mForceDisableHardwareKeyboard) {
                hardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
            }
            if (hardKeyboardAvailable != mHardKeyboardAvailable) {
                mHardKeyboardAvailable = hardKeyboardAvailable;
                mShowImeWithHardKeyboard = hardKeyboardAvailable;
                mH.removeMessages(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
                mH.sendEmptyMessage(H.REPORT_HARD_KEYBOARD_STATUS_CHANGE);
            }