From 7f300e3dfff8712483991ec81696f324e2f2b61e Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 7 Jun 2018 18:22:25 -0700 Subject: [PATCH] Track shelf rather than app window Change swipe length to be the height of the shelf rather than the distance to the bottom of the task in recents. The shelf already uses this distance to determine its starting offset, and the window uses it to determine how fast to move. So by setting the distance to the height of the shelf, we effectively make the window move slightly faster and the shelf move directly under your finger. Bug: 109817942 Change-Id: I9b20bbed58cccc6f74aba36000a6ca272f9d554d --- .../src/com/android/quickstep/ActivityControlHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 0205c1f032..1848cac17c 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -185,7 +185,9 @@ public interface ActivityControlHelper { int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right; return dp.hotseatBarSizePx + dp.hotseatBarSidePaddingPx + hotseatInset; } else { - return dp.heightPx - outRect.rect.bottom; + int shelfHeight = dp.hotseatBarSizePx + dp.getInsets().bottom; + // Track slightly below the top of the shelf (between top and content). + return shelfHeight - dp.edgeMarginPx * 2; } }