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
This commit is contained in:
Tony
2018-06-07 18:22:25 -07:00
parent 34838cf551
commit 7f300e3dff

View File

@@ -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;
}
}