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

Commit fa0acf56 authored by Aaron Kling's avatar Aaron Kling
Browse files

Allow forcing landscape mode with an overlay

Partial backport of I770cf207c08ba0d36de6e3b6ab378e94498a02bd

Change-Id: I35abd3433d3e95e4d62671fe15a59cb6ddbb33d0
parent 5df86086
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -51,5 +51,9 @@
             4 - Snap to the long edges in each orientation and magnet to corners
    -->
    <integer name="config_pictureInPictureSnapMode">3</integer>

    <!-- Controls whether the nav bar can move from the bottom to the side in landscape.
         Only applies if the device display is not square. -->
    <bool name="config_navBarCanMove">false</bool>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -3109,6 +3109,10 @@
         -->
    <integer name="config_navBarOpacityMode">0</integer>

    <!-- Controls whether the nav bar can move from the bottom to the side in landscape.
         Only applies if the device display is not square. -->
    <bool name="config_navBarCanMove">true</bool>

    <!-- Default insets [LEFT/RIGHTxTOP/BOTTOM] from the screen edge for picture-in-picture windows.
         These values are in DPs and will be converted to pixel sizes internally. -->
    <string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">16x16</string>
+1 −0
Original line number Diff line number Diff line
@@ -2679,6 +2679,7 @@
  <java-symbol type="string" name="config_packagedKeyboardName" />
  <java-symbol type="bool" name="config_forceWindowDrawsStatusBarBackground" />
  <java-symbol type="integer" name="config_navBarOpacityMode" />
  <java-symbol type="bool" name="config_navBarCanMove" />
  <java-symbol type="color" name="system_bar_background_semi_transparent" />

  <!-- EditText suggestion popup. -->
+1 −1
Original line number Diff line number Diff line
@@ -2727,7 +2727,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;

        // Allow the navigation bar to move on non-square small devices (phones).
        mNavigationBarCanMove = width != height && shortSizeDp < 600;
        mNavigationBarCanMove = width != height && res.getBoolean(R.bool.config_navBarCanMove);

        mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);