[Gesture Library Integration] Update the check for motion events on

trackpad

The gesture library is ported and enabled, thus we are updating our
check for motion events on trackpad.

Bug: 254783214
Test: Swipe up and hold to go to overview; swipe up to go home
Change-Id: I4b74e88c7f8b6ef86c779391b0f8064ea828ed8f
This commit is contained in:
Tracy Zhou
2023-01-23 22:06:19 -08:00
parent d93467fc22
commit d248ee7507
7 changed files with 72 additions and 27 deletions
@@ -369,7 +369,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
mIsTaskbarAllAppsOpen = controller != null && controller.isTaskbarAllAppsOpen();
mTaskbarAppWindowThreshold =
res.getDimensionPixelSize(R.dimen.taskbar_app_window_threshold);
boolean swipeWillNotShowTaskbar = mTaskbarAlreadyOpen;
boolean swipeWillNotShowTaskbar = mTaskbarAlreadyOpen || mGestureState.isTrackpadGesture();
mTaskbarHomeOverviewThreshold = swipeWillNotShowTaskbar
? 0
: res.getDimensionPixelSize(R.dimen.taskbar_home_overview_threshold);
@@ -2317,7 +2317,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
return displacement;
}
if (mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen) {
if (mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen || mGestureState.isTrackpadGesture()) {
return displacement;
}