Update hotseat sizing for 4x5 grids.
If the qsb bottom margin is smaller than the bottom insets,
we'll fall back to centering the qsb in the available freespace.
Bug: 194435265
Test: 4x5 grid
multiple devices,
with: gesture nav enabled
3 button nav enabled
Merged-In: I9fd4f0da3f2bc9f0b38a621ad1192533260379e3
Change-Id: I711e7d168b80254e73df0d4e1854756d819a705b
diff --git a/res/xml/size_limits_80x104.xml b/res/xml/size_limits_80x104.xml
index 93d43fb..4178664 100644
--- a/res/xml/size_limits_80x104.xml
+++ b/res/xml/size_limits_80x104.xml
@@ -80,10 +80,10 @@
launcher:b="16dp"/>
<workspaceBottomPadding
launcher:a="1"
- launcher:c="52dp"/>
+ launcher:c="72dp"/>
<hotseatBottomPadding
launcher:a="0"
- launcher:b="36dp"/>
+ launcher:b="56dp"/>
</device-padding>
<device-padding
@@ -93,10 +93,10 @@
launcher:b="39dp"/>
<workspaceBottomPadding
launcher:a="1"
- launcher:c="75dp"/>
+ launcher:c="95dp"/>
<hotseatBottomPadding
launcher:a="0"
- launcher:b="36dp"/>
+ launcher:b="56dp"/>
</device-padding>
<device-padding
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 0a6f06c..eaca162 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -207,7 +207,7 @@
? dp.workspacePadding.bottom
: dp.hotseatBarSizePx - dp.hotseatCellHeightPx - mQsbHeight;
- if (dp.isScalableGrid) {
+ if (dp.isScalableGrid && dp.qsbBottomMarginPx > dp.getInsets().bottom) {
return Math.min(dp.qsbBottomMarginPx, freeSpace);
} else {
return (int) (freeSpace * QSB_CENTER_FACTOR) + (dp.isTaskbarPresent