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

Commit 63d991f2 authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Add config option for permanent dpad presence." into lmp-dev

parents 7436d199 a59e6234
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1666,6 +1666,9 @@
         2 - The device DOES NOT have a permanent menu key; ignore autodetection. -->
    <integer name="config_overrideHasPermanentMenuKey">0</integer>

    <!-- Override the DPad detection behavior for configuration purposes -->
    <bool name="config_hasPermanentDpad">false</bool>

    <!-- default window inset isRound property -->
    <bool name="config_windowIsRound">false</bool>

+1 −0
Original line number Diff line number Diff line
@@ -364,6 +364,7 @@
  <java-symbol type="integer" name="config_volte_replacement_rat"/>
  <java-symbol type="integer" name="config_valid_wappush_index" />
  <java-symbol type="integer" name="config_overrideHasPermanentMenuKey" />
  <java-symbol type="bool" name="config_hasPermanentDpad" />

  <java-symbol type="color" name="tab_indicator_text_v4" />

+10 −0
Original line number Diff line number Diff line
@@ -333,6 +333,8 @@ public class WindowManagerService extends IWindowManager.Stub

    final boolean mHaveInputMethods;

    final boolean mHasPermanentDpad;

    final boolean mAllowBootMessages;

    final boolean mLimitedAlphaCompositing;
@@ -804,6 +806,8 @@ public class WindowManagerService extends IWindowManager.Stub
        mOnlyCore = onlyCore;
        mLimitedAlphaCompositing = context.getResources().getBoolean(
                com.android.internal.R.bool.config_sf_limitedAlpha);
        mHasPermanentDpad = context.getResources().getBoolean(
                com.android.internal.R.bool.config_hasPermanentDpad);
        mInputManager = inputManager; // Must be before createDisplayContentLocked.
        mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
        mDisplaySettings = new DisplaySettings(context);
@@ -7182,6 +7186,11 @@ public class WindowManagerService extends IWindowManager.Stub
                }
            }

            if (config.navigation == Configuration.NAVIGATION_NONAV && mHasPermanentDpad) {
                config.navigation = Configuration.NAVIGATION_DPAD;
                navigationPresence |= WindowManagerPolicy.PRESENCE_INTERNAL;
            }

            // Determine whether a hard keyboard is available and enabled.
            boolean hardKeyboardAvailable = config.keyboard != Configuration.KEYBOARD_NOKEYS;
            if (hardKeyboardAvailable != mHardKeyboardAvailable) {
@@ -10976,6 +10985,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
        pw.println();
        pw.print("  mCurConfiguration="); pw.println(this.mCurConfiguration);
        pw.print("  mHasPermanentDpad="); pw.println(mHasPermanentDpad);
        pw.print("  mCurrentFocus="); pw.println(mCurrentFocus);
        if (mLastFocus != mCurrentFocus) {
            pw.print("  mLastFocus="); pw.println(mLastFocus);