Merge "Track shelf rather than app window" into ub-launcher3-edmonton-polish
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index f1aff05..8e4270e 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -187,7 +187,9 @@
                 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;
             }
         }