Fix swiping up to Overview in landscape mode

Bug: 121280703
Change-Id: I9802c6f547a592be891e7c4f5e8db8dadaa0425d
Tests: TaplTests, locally modified to force Landscape
This commit is contained in:
Vadim Tryshev 2018-08-30 16:01:47 -07:00 committed by vadimt
parent d182943d3d
commit 44ecb9d7cb
1 changed files with 2 additions and 1 deletions

View File

@ -344,7 +344,8 @@ public class TouchInteractionService extends Service {
startTouchTracking(ev, true /* updateLocationOffset */); startTouchTracking(ev, true /* updateLocationOffset */);
break; break;
case ACTION_MOVE: { case ACTION_MOVE: {
float displacement = ev.getY() - mDownPos.y; float displacement = mActivity.getDeviceProfile().isLandscape ?
ev.getX() - mDownPos.x : ev.getY() - mDownPos.y;
if (Math.abs(displacement) >= mTouchSlop) { if (Math.abs(displacement) >= mTouchSlop) {
// Start tracking only when mTouchSlop is crossed. // Start tracking only when mTouchSlop is crossed.
startTouchTracking(ev, true /* updateLocationOffset */); startTouchTracking(ev, true /* updateLocationOffset */);