Fix shelf tracking distance for landscape app over portrait launcher

Bug: 149934536
Change-Id: I14fa62fa9f51356613f4a3827446b00af774dbf5
This commit is contained in:
Tony Wickham committed 2020-07-13 13:21:02 -07:00
1 parent b82121c006
commit 452db0db0c
1 file changed
+3 -1
@@ -49,7 +49,9 @@ public class LayoutUtils {
Rect taskSize = new Rect();
LauncherActivityInterface.INSTANCE.calculateTaskSize(context, dp, taskSize,
orientationHandler);
return (dp.heightPx - taskSize.height()) / 2;
return (orientationHandler.getSecondaryValue(dp.widthPx, dp.heightPx)
- orientationHandler.getSecondaryValue(taskSize.width(), taskSize.height()))
/ 2;
}
int shelfHeight = dp.hotseatBarSizePx + dp.getInsets().bottom;
int spaceBetweenShelfAndRecents = (int) context.getResources().getDimension(