Calculate icon bitmap size after preference override

This commit is contained in:
Suphon Thanakornpakapong committed 2021-09-04 23:21:07 +07:00
1 parent 7b67942098
commit 9ea62e4d13
1 file changed
+3 -2
@@ -264,9 +264,7 @@ public class InvariantDeviceProfile {
iconSize = displayOption.iconSize;
iconShapePath = getIconShapePath(context);
landscapeIconSize = displayOption.landscapeIconSize;
iconBitmapSize = ResourceUtils.pxFromDp(iconSize, displayInfo.metrics);
iconTextSize = displayOption.iconTextSize;
fillResIconDpi = getLauncherIconDensity(iconBitmapSize);
if (Utilities.isGridOptionsEnabled(context)) {
allAppsIconSize = displayOption.allAppsIconSize;
@@ -281,6 +279,9 @@ public class InvariantDeviceProfile {
applyPartnerDeviceProfileOverrides(context, displayInfo.metrics);
DeviceProfileOverrides.getINSTANCE().get(context).apply(this, closestProfile);
iconBitmapSize = ResourceUtils.pxFromDp(Math.max(iconSize, allAppsIconSize), displayInfo.metrics);
fillResIconDpi = getLauncherIconDensity(iconBitmapSize);
Point realSize = new Point(displayInfo.realSize);
// The real size never changes. smallSide and largeSide will remain the
// same in any orientation.