summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorTony <twickham@google.com>2018-06-07 18:22:25 -0700
committerTony <twickham@google.com>2018-06-07 18:23:19 -0700
commit7f300e3dfff8712483991ec81696f324e2f2b61e (patch)
treeaa2c1814a7e3721ec03092a902091173b75135af /quickstep
parent34838cf551cdc9b948a144ddadfc0d6117096d63 (diff)
downloadandroid_packages_apps_Trebuchet-7f300e3dfff8712483991ec81696f324e2f2b61e.tar.gz
android_packages_apps_Trebuchet-7f300e3dfff8712483991ec81696f324e2f2b61e.tar.bz2
android_packages_apps_Trebuchet-7f300e3dfff8712483991ec81696f324e2f2b61e.zip
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
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/ActivityControlHelper.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index 0205c1f03..1848cac17 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -185,7 +185,9 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
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;
}
}