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

Commit 4723b4e5 authored by Winson Chung's avatar Winson Chung
Browse files

Landscape mode for gestural nav

Bug: 128129398
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:DisplayPolicyTests
Change-Id: I770cf207c08ba0d36de6e3b6ab378e94498a02bd
parent 1993b95b
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
@@ -3237,6 +3237,10 @@
         2: gestures only for back, home and overview -->
    <integer name="config_navBarInteractionMode">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
@@ -2837,6 +2837,7 @@
  <java-symbol type="bool" name="config_forceWindowDrawsStatusBarBackground" />
  <java-symbol type="integer" name="config_navBarOpacityMode" />
  <java-symbol type="integer" name="config_navBarInteractionMode" />
  <java-symbol type="bool" name="config_navBarCanMove" />
  <java-symbol type="color" name="system_bar_background_semi_transparent" />

  <!-- EditText suggestion popup. -->
+2 −1
Original line number Diff line number Diff line
@@ -1192,7 +1192,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        if (DEBUG) Log.d(TAG, String.format(
                "onMeasure: (%dx%d) old: (%dx%d)", w, h, getMeasuredWidth(), getMeasuredHeight()));

        final boolean newVertical = w > 0 && h > w;
        final boolean newVertical = w > 0 && h > w
                && !QuickStepContract.isGesturalMode(getContext());
        if (newVertical != mIsVertical) {
            mIsVertical = newVertical;
            if (DEBUG) {
+4 −0
Original line number Diff line number Diff line
@@ -22,4 +22,8 @@
         1: 2 button mode (back, home buttons + swipe up for overview)
         2: gestures only for back, home and overview -->
    <integer name="config_navBarInteractionMode">2</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>
 No newline at end of file
Loading