diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 71152538c9..4e22812b41 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -601,7 +601,7 @@ public class DeviceProfile { mHotseatQsbSpaceBase = hotseatQsbSpace; if (mIsResponsiveGrid) { - updateHotseatSizes(mResponsiveWorkspaceCellSpec.getIconSize()); + updateHotseatSizes(getResponsiveIconSizePx()); } else { updateHotseatSizes(pxFromDp(inv.iconSize[mTypeIndex], mMetrics)); } @@ -1138,7 +1138,7 @@ public class DeviceProfile { iconCenterVertically = (mIsScalableGrid || mIsResponsiveGrid) && isVerticalBarLayout(); if (mIsResponsiveGrid) { - iconSizePx = mResponsiveWorkspaceCellSpec.getIconSize(); + iconSizePx = getResponsiveIconSizePx(); iconTextSizePx = mResponsiveWorkspaceCellSpec.getIconTextSize(); mIconDrawablePaddingOriginalPx = mResponsiveWorkspaceCellSpec.getIconDrawablePadding(); maxIconTextLineCount = mResponsiveWorkspaceCellSpec.getIconTextMaxLineCount(); @@ -1183,6 +1183,16 @@ public class DeviceProfile { return Math.round(extraHeight); } + /** + * LC-Note: the responsive cell specs' icon size, scaled by Home screen > Icon size like the + * grids sized from the IDP (whose iconSize DeviceProfileOverrides scales). The specs never see + * that setting otherwise. + */ + private int getResponsiveIconSizePx() { + return Math.max(1, Math.round(mResponsiveWorkspaceCellSpec.getIconSize() + * PreferenceCacheExtensionsKt.firstCached(preferenceManager2.getHomeIconSizeFactor()))); + } + private int getCellLayoutHeightSpecification() { return (cellHeightPx * inv.numRows) + (cellLayoutBorderSpacePx.y * (inv.numRows - 1)) + cellLayoutPaddingPx.top + cellLayoutPaddingPx.bottom; @@ -1507,7 +1517,7 @@ public class DeviceProfile { private void updateFolderCellSize(float scale, Resources res) { int minLabelTextSize = pxFromSp(MIN_FOLDER_TEXT_SIZE_SP, mMetrics, scale); if (mIsResponsiveGrid) { - folderChildIconSizePx = mResponsiveWorkspaceCellSpec.getIconSize(); + folderChildIconSizePx = getResponsiveIconSizePx(); folderChildTextSizePx = mResponsiveWorkspaceCellSpec.getIconTextSize(); folderLabelTextSizePx = Math.max(minLabelTextSize, (int) (folderChildTextSizePx * folderLabelTextScale));