Fix triggering One-handed mode introduces gesture conflict issues

(1/n)

Define a new larger gesture height instead of replacing
existing navigation_bar_gesture_height with RRO.

Bug: 159580663

Test: manual
Change-Id: I6de15287f880b0416a9faa11a74304267eeecb61
This commit is contained in:
Jason Chang
2020-12-24 16:02:35 +08:00
parent eb9f2ac600
commit 2bff44d31e
4 changed files with 7 additions and 2 deletions

View File

@@ -66,6 +66,10 @@
<!-- The height of the navigation gesture area if the gesture is starting from the bottom. -->
<dimen name="navigation_bar_gesture_height">@dimen/navigation_bar_frame_height</dimen>
<!-- The height of the navigation larger gesture area if the gesture is starting from
the bottom. -->
<dimen name="navigation_bar_gesture_larger_height">80dp</dimen>
<!-- Height of the bottom navigation / system bar in car mode. -->
<dimen name="navigation_bar_height_car_mode">96dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as

View File

@@ -1702,6 +1702,7 @@
<java-symbol type="dimen" name="navigation_bar_frame_height" />
<java-symbol type="dimen" name="navigation_bar_frame_height_landscape" />
<java-symbol type="dimen" name="navigation_bar_gesture_height" />
<java-symbol type="dimen" name="navigation_bar_gesture_larger_height" />
<java-symbol type="dimen" name="navigation_bar_height_car_mode" />
<java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" />
<java-symbol type="dimen" name="navigation_bar_width_car_mode" />

View File

@@ -88,7 +88,7 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback,
mDisplayController = displayController;
displayController.addDisplayChangingController(this);
mNavGestureHeight = context.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.navigation_bar_gesture_height);
com.android.internal.R.dimen.navigation_bar_gesture_larger_height);
mDragDistThreshold = context.getResources().getDimensionPixelSize(
R.dimen.gestures_onehanded_drag_threshold);
final float slop = ViewConfiguration.get(context).getScaledTouchSlop();

View File

@@ -18,5 +18,5 @@
-->
<resources>
<!-- The height of the bottom navigation gesture area. -->
<dimen name="navigation_bar_gesture_height">80dp</dimen>
<dimen name="navigation_bar_gesture_larger_height">80dp</dimen>
</resources>