Add folder shapes for corresponding icon shapes

Bug: 372886883
Bug: 389329983
Test: Presubmit && IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: I46b27b391fef5f379c65d81816353c93f56f2e1d
This commit is contained in:
Charlie Anderson
2025-01-23 22:31:24 +00:00
parent 4c261f7343
commit fcb3d2ec38
9 changed files with 288 additions and 99 deletions
+2 -2
View File
@@ -25,7 +25,6 @@ import static com.android.launcher3.InvariantDeviceProfile.INDEX_TWO_PANEL_LANDS
import static com.android.launcher3.InvariantDeviceProfile.INDEX_TWO_PANEL_PORTRAIT;
import static com.android.launcher3.Utilities.dpiFromPx;
import static com.android.launcher3.Utilities.pxFromSp;
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVERLAP_FACTOR;
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
import static com.android.launcher3.testing.shared.ResourceUtils.INVALID_RESOURCE_HANDLE;
import static com.android.launcher3.testing.shared.ResourceUtils.pxFromDp;
@@ -52,6 +51,7 @@ import androidx.core.content.res.ResourcesCompat;
import com.android.launcher3.CellLayout.ContainerType;
import com.android.launcher3.DevicePaddings.DevicePadding;
import com.android.launcher3.folder.ClippedFolderIconLayoutRule;
import com.android.launcher3.graphics.IconShape;
import com.android.launcher3.icons.DotRenderer;
import com.android.launcher3.icons.IconNormalizer;
@@ -1228,7 +1228,7 @@ public class DeviceProfile {
}
private int getIconSizeWithOverlap(int iconSize) {
return (int) Math.ceil(iconSize * ICON_OVERLAP_FACTOR);
return (int) Math.ceil(iconSize * ClippedFolderIconLayoutRule.getIconOverlapFactor());
}
/**