Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90e43f50 authored by Thales Lima's avatar Thales Lima Committed by Automerger Merge Worker
Browse files

Merge "launcher: use same icon size for all apps drawer in foldables" into...

Merge "launcher: use same icon size for all apps drawer in foldables" into sc-v2-dev am: d9d7f721 am: 68c8db91

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16131869

Change-Id: I1ad73112dd076d846c75c1cf0697604abe43914e
parents 79b384b0 68c8db91
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -286,7 +286,11 @@ public class InvariantDeviceProfile {
        mExtraAttrs = closestProfile.extraAttrs;

        iconSize = displayOption.iconSizes;
        iconBitmapSize = ResourceUtils.pxFromDp(iconSize[INDEX_DEFAULT], metrics);
        float maxIconSize = iconSize[0];
        for (int i = 1; i < iconSize.length; i++) {
            maxIconSize = Math.max(maxIconSize, iconSize[i]);
        }
        iconBitmapSize = ResourceUtils.pxFromDp(maxIconSize, metrics);
        fillResIconDpi = getLauncherIconDensity(iconBitmapSize);

        iconTextSize = displayOption.textSizes;
@@ -555,13 +559,10 @@ public class InvariantDeviceProfile {
        }
        out.multiply(1.0f / weights);

        // Since the bitmaps are persisted, ensure that the default bitmap size is same as
        // Since the bitmaps are persisted, ensure that all bitmap sizes are not larger than
        // predefined size to avoid cache invalidation
        out.iconSizes[INDEX_DEFAULT] =
                closestPoint.iconSizes[INDEX_DEFAULT];
        for (int i = INDEX_DEFAULT + 1; i < COUNT_SIZES; i++) {
            out.iconSizes[i] = Math.min(out.iconSizes[i],
                    out.iconSizes[INDEX_DEFAULT]);
        for (int i = INDEX_DEFAULT; i < COUNT_SIZES; i++) {
            out.iconSizes[i] = Math.min(out.iconSizes[i], closestPoint.iconSizes[i]);
        }

        return out;