Merge "Fix shelf tracking distance for landscape app over portrait launcher" into ub-launcher3-rvc-qpr-dev

This commit is contained in:
TreeHugger Robot
2020-07-13 20:44:30 +00:00
committed by Android (Google) Code Review
@@ -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(