From 452db0db0c96f0277aba8d3f110073cb87e9d4de Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 13 Jul 2020 13:21:02 -0700 Subject: [PATCH] Fix shelf tracking distance for landscape app over portrait launcher Bug: 149934536 Change-Id: I14fa62fa9f51356613f4a3827446b00af774dbf5 --- quickstep/src/com/android/quickstep/util/LayoutUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/LayoutUtils.java b/quickstep/src/com/android/quickstep/util/LayoutUtils.java index ae19d73719..4bd332a64f 100644 --- a/quickstep/src/com/android/quickstep/util/LayoutUtils.java +++ b/quickstep/src/com/android/quickstep/util/LayoutUtils.java @@ -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(