From b31d8fc379a429d082422151ed5e20b8d72c50a3 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Thu, 18 Mar 2021 13:57:20 -0700 Subject: [PATCH] Use taskbarSize as bottom inset when taskbar is present. This was done in ag/13841736 but not included in ag/13821586 Test: QSB in correct position when taskbar present and not present Bug: 171917176 Change-Id: I6aa220559afebe8710b5f01cdec9c2baa9f4c926 --- .../src/com/android/launcher3/taskbar/TaskbarController.java | 2 +- src/com/android/launcher3/Hotseat.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java index a2b2ddd5dd..f652961629 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java @@ -472,7 +472,7 @@ public class TaskbarController { public void alignRealHotseatWithTaskbar() { Rect hotseatBounds = new Rect(); DeviceProfile grid = mLauncher.getDeviceProfile(); - int hotseatHeight = grid.workspacePadding.bottom + grid.getInsets().bottom; + int hotseatHeight = grid.workspacePadding.bottom + grid.taskbarSize; int hotseatTopDiff = hotseatHeight - grid.taskbarSize; mTaskbarView.getHotseatBoundsAtScale(getTaskbarScaleOnHome()).roundOut(hotseatBounds); diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java index 0e9de45e2f..5007d0d450 100644 --- a/src/com/android/launcher3/Hotseat.java +++ b/src/com/android/launcher3/Hotseat.java @@ -123,7 +123,7 @@ public class Hotseat extends CellLayout implements Insettable { lp.height = (grid.isTaskbarPresent ? grid.workspacePadding.bottom : grid.hotseatBarSizePx) - + insets.bottom; + + (grid.isTaskbarPresent ? grid.taskbarSize : insets.bottom); } if (!grid.isTaskbarPresent) { @@ -214,7 +214,7 @@ public class Hotseat extends CellLayout implements Insettable { : dp.hotseatBarSizePx - dp.hotseatCellHeightPx - mQsbHeight; int bottom = b - t - (int) (freeSpace * QSB_CENTER_FACTOR) - - dp.getInsets().bottom; + - (dp.isTaskbarPresent ? dp.taskbarSize : dp.getInsets().bottom); int top = bottom - mQsbHeight; mQsb.layout(left, top, right, bottom); }