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

Commit b0a061e5 authored by Jeff Chang's avatar Jeff Chang
Browse files

Improve system gesture listener to handle display cutout

Expand swipe start threshold such that we can catch touches that just
start below the notch area.

Bug: 123050747
Test: -- 1.Setup a pixel stand.
         2.Verify swipe getsture to dismiss the immersiveModeConfirmation.
      -- atest HeadsUpManagerPhoneTest

Change-Id: Iaad1fbeabf165439667e25f564ae97dee68cb2d5
parent 2f662e64
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@
    <dimen name="navigation_bar_height_landscape">48dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen -->
    <dimen name="navigation_bar_width">48dp</dimen>
    <!-- How much we expand the touchable region of the status bar below the notch to catch touches
         that just start below the notch. -->
    <dimen name="display_cutout_touchable_region_size">12dp</dimen>

    <!-- EXPERIMENT BEGIN -->
    <!-- Height of the bottom navigation bar frame; this is different than navigation_bar_height
+1 −0
Original line number Diff line number Diff line
@@ -1745,6 +1745,7 @@
  <java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" />
  <java-symbol type="dimen" name="navigation_bar_width_car_mode" />
  <java-symbol type="dimen" name="status_bar_height" />
  <java-symbol type="dimen" name="display_cutout_touchable_region_size" />
  <java-symbol type="dimen" name="quick_qs_offset_height" />
  <java-symbol type="dimen" name="quick_qs_total_height" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_off" />
+0 −4
Original line number Diff line number Diff line
@@ -977,10 +977,6 @@
    <!-- How much into a DisplayCutout's bounds we can go, on each side -->
    <dimen name="display_cutout_margin_consumption">0px</dimen>

    <!-- How much we expand the touchable region of the status bar below the notch to catch touches
         that just start below the notch. -->
    <dimen name="display_cutout_touchable_region_size">12dp</dimen>

    <!-- Padding below Ongoing App Ops dialog title -->
    <dimen name="ongoing_appops_dialog_sep">16dp</dimen>
    <!--Padding around text items in Ongoing App Ops dialog -->
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class HeadsUpManagerPhone extends HeadsUpManager implements Dumpable,
        mHeadsUpInset = mStatusBarHeight + resources.getDimensionPixelSize(
                R.dimen.heads_up_status_bar_padding);
        mDisplayCutoutTouchableRegionSize = resources.getDimensionPixelSize(
                R.dimen.display_cutout_touchable_region_size);
                com.android.internal.R.dimen.display_cutout_touchable_region_size);
    }

    @Override
+1 −0
Original line number Diff line number Diff line
@@ -2541,6 +2541,7 @@ public class DisplayPolicy {
     */
    public void onOverlayChangedLw() {
        onConfigurationChanged();
        mSystemGestures.onConfigurationChanged();
    }

    /**
Loading