2/ Resolve gesture one handed conflicts swipe up recents

When user trigger OHM, we should stop user going to both recents
and quick switch until user exit one handed mode.

The previous design is quite flickering due to below gestures
are in race condition:
1) One handed mode swipe up to exit
2) Swipe up to recents
3) Swipe horizontal to quick switch

Test: manual
Bug: 177978035
Change-Id: I10206ba9c263ead24a83a9ee0ffea2ea45eb819d
This commit is contained in:
Bill Lin
2021-04-19 20:39:15 +08:00
parent 714d0b89a3
commit 789aa86617
@@ -506,7 +506,8 @@ public class TouchInteractionService extends Service implements PluginListener<O
}
mRotationTouchHelper.setOrientationTransformIfNeeded(event);
if (mRotationTouchHelper.isInSwipeUpTouchRegion(event)) {
if (!mDeviceState.isOneHandedModeActive()
&& mRotationTouchHelper.isInSwipeUpTouchRegion(event)) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME,
"TouchInteractionService.onInputEvent:isInSwipeUpTouchRegion");
@@ -535,8 +536,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
InputConsumer.NO_OP, mInputMonitorCompat,
mDeviceState,
event);
} else if (mDeviceState.canTriggerOneHandedAction(event)
&& !mDeviceState.isOneHandedModeActive()) {
} else if (mDeviceState.canTriggerOneHandedAction(event)) {
// Consume gesture event for triggering one handed feature.
mUncheckedConsumer = new OneHandedModeInputConsumer(this, mDeviceState,
InputConsumer.NO_OP, mInputMonitorCompat);