From 6f5f8cac256eeeb482447023f8fdf7f9e8fda8bf Mon Sep 17 00:00:00 2001 From: Charlie Anderson Date: Thu, 13 Mar 2025 03:09:39 +0000 Subject: [PATCH] Update folder previews to new specs Bug: 403616844 Flag: com.android.launcher3.enable_launcher_icon_shapes Test: visually comparing against spec Change-Id: I671b3de7d4ac574122ee3a33451f6cb1d6155f29 --- src/com/android/launcher3/DeviceProfile.java | 4 +- .../folder/ClippedFolderIconLayoutRule.java | 72 +++++++++---------- .../android/launcher3/folder/FolderIcon.java | 4 +- .../launcher3/folder/PreviewBackground.java | 3 +- .../launcher3/folder/PreviewItemManager.java | 4 +- .../launcher3/graphics/ShapeDelegate.kt | 23 +++--- .../launcher3/graphics/ThemeManager.kt | 17 ++--- .../launcher3/shapes/IconShapeModel.kt | 3 +- .../launcher3/shapes/ShapesProvider.kt | 13 ---- .../launcher3/shapes/ShapesProviderTest.kt | 45 ------------ 10 files changed, 63 insertions(+), 125 deletions(-) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index b941ff65ee..696794a703 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -25,6 +25,7 @@ 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,7 +53,6 @@ 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.ThemeManager; import com.android.launcher3.icons.DotRenderer; import com.android.launcher3.model.data.ItemInfo; @@ -1231,7 +1231,7 @@ public class DeviceProfile { } private int getIconSizeWithOverlap(int iconSize) { - return (int) Math.ceil(iconSize * ClippedFolderIconLayoutRule.getIconOverlapFactor()); + return (int) Math.ceil(iconSize * ICON_OVERLAP_FACTOR); } /** diff --git a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java index fedc1181c2..4ba35c0cc0 100644 --- a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java +++ b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java @@ -9,13 +9,13 @@ public class ClippedFolderIconLayoutRule { private static final float MIN_SCALE = 0.44f; private static final float MAX_SCALE = 0.51f; + // TODO: figure out exact radius for different icons - private static final float MAX_RADIUS_DILATION_SHAPES = 0.15f; private static final float MAX_RADIUS_DILATION = 0.25f; // The max amount of overlap the preview items can go outside of the background bounds. public static final float ICON_OVERLAP_FACTOR = 1 + (MAX_RADIUS_DILATION / 2f); - public static final float ICON_OVERLAP_FACTOR_SHAPES = 1f; private static final float ITEM_RADIUS_SCALE_FACTOR = 1.15f; + private static final float ITEM_RADIUS_SCALE_FACTOR_SHAPES = 1.2f; public static final int EXIT_INDEX = -2; public static final int ENTER_INDEX = -3; @@ -30,7 +30,11 @@ public class ClippedFolderIconLayoutRule { public void init(int availableSpace, float intrinsicIconSize, boolean rtl) { mAvailableSpace = availableSpace; - mRadius = ITEM_RADIUS_SCALE_FACTOR * availableSpace / 2f; + mRadius = ( + Flags.enableLauncherIconShapes() + ? ITEM_RADIUS_SCALE_FACTOR_SHAPES + : ITEM_RADIUS_SCALE_FACTOR + ) * availableSpace / 2f; mIconSize = intrinsicIconSize; mIsRtl = rtl; mBaselineIconScale = availableSpace / intrinsicIconSize; @@ -53,20 +57,6 @@ public class ClippedFolderIconLayoutRule { } else if (index >= MAX_NUM_ITEMS_IN_PREVIEW) { // Items beyond those displayed in the preview are animated to the center mTmpPoint[0] = mTmpPoint[1] = mAvailableSpace / 2 - (mIconSize * totalScale) / 2; - } else if (Flags.enableLauncherIconShapes()) { - if (index == 0) { - // top left - getGridPosition(0, 0, mTmpPoint); - } else if (index == 1) { - // top right - getGridPosition(0, 1, mTmpPoint); - } else if (index == 2) { - // bottom left - getGridPosition(1, 0, mTmpPoint); - } else if (index == 3) { - // bottom right - getGridPosition(1, 1, mTmpPoint); - } } else { getPosition(index, curNumItems, mTmpPoint); } @@ -87,7 +77,7 @@ public class ClippedFolderIconLayoutRule { * {@link #MAX_NUM_ITEMS_IN_PREVIEW} in the preview. * * Positions in the grid: 0 1 // 0 is row 0, col 1 - * 2 3 // 3 is row 1, col 1 + * 2 3 // 3 is row 1, col 1` */ private void getGridPosition(int row, int col, float[] result) { // We use position 0 and 3 to calculate the x and y distances between items. @@ -103,7 +93,6 @@ public class ClippedFolderIconLayoutRule { result[1] = top + (row * dy); } - // b/392610664 TODO: Change positioning from circular geometry to square / grid-based. private void getPosition(int index, int curNumItems, float[] result) { // The case of two items is homomorphic to the case of one. curNumItems = Math.max(curNumItems, 2); @@ -132,13 +121,8 @@ public class ClippedFolderIconLayoutRule { index = 3; } - // We bump the radius up between 0 and MAX_RADIUS_DILATION % as the number of items increase - float radiusDilation = Flags.enableLauncherIconShapes() ? MAX_RADIUS_DILATION_SHAPES - : MAX_RADIUS_DILATION; - float radius = mRadius * (1 + radiusDilation * (curNumItems - MIN_NUM_ITEMS_IN_PREVIEW) - / (MAX_NUM_ITEMS_IN_PREVIEW - MIN_NUM_ITEMS_IN_PREVIEW)); + float radius = getRadius(curNumItems); double theta = theta0 + index * (2 * Math.PI / curNumItems) * direction; - float halfIconSize = (mIconSize * scaleForItem(curNumItems)) / 2; // Map the location along the circle, and offset the coordinates to represent the center @@ -146,13 +130,24 @@ public class ClippedFolderIconLayoutRule { // is inverted to match the coordinate system. result[0] = mAvailableSpace / 2 + (float) (radius * Math.cos(theta) / 2) - halfIconSize; result[1] = mAvailableSpace / 2 + (float) (- radius * Math.sin(theta) / 2) - halfIconSize; + } + private float getRadius(int numItems) { + float radiusDilation = Flags.enableLauncherIconShapes() ? radiusDilationForItems(numItems) + : MAX_RADIUS_DILATION; + if (Flags.enableLauncherIconShapes()) { + // Just give custom radius weights for each # of icons. + return mRadius * (1 + radiusDilation); + } else { + // Increase radius from 0 up to MAX_RADIUS_DILATION as the number of items increases. + return mRadius * (1 + radiusDilation * (numItems - MIN_NUM_ITEMS_IN_PREVIEW) + / (MAX_NUM_ITEMS_IN_PREVIEW - MIN_NUM_ITEMS_IN_PREVIEW)); + } } public float scaleForItem(int numItems) { - // Scale is determined by the number of items in the preview. - final float scale; - if (numItems <= 3 && !Flags.enableLauncherIconShapes()) { + float scale; + if (numItems <= 3) { scale = MAX_SCALE; } else { scale = MIN_SCALE; @@ -160,18 +155,17 @@ public class ClippedFolderIconLayoutRule { return scale * mBaselineIconScale; } + private float radiusDilationForItems(int numItems) { + if (numItems == 3) { + return 0.15f; + } else if (numItems == MAX_NUM_ITEMS_IN_PREVIEW) { + return 0.12f; + } else { + return 0; + } + } + public float getIconSize() { return mIconSize; } - - /** - * Gets correct constant for icon overlap. - */ - public static float getIconOverlapFactor() { - if (Flags.enableLauncherIconShapes()) { - return ICON_OVERLAP_FACTOR_SHAPES; - } else { - return ICON_OVERLAP_FACTOR; - } - } } diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java index b694fcd934..23045507d1 100644 --- a/src/com/android/launcher3/folder/FolderIcon.java +++ b/src/com/android/launcher3/folder/FolderIcon.java @@ -17,6 +17,7 @@ package com.android.launcher3.folder; import static com.android.launcher3.Flags.enableCursorHoverStates; +import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVERLAP_FACTOR; import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW; import static com.android.launcher3.folder.FolderGridOrganizer.createFolderGridOrganizer; import static com.android.launcher3.folder.PreviewItemManager.INITIAL_ITEM_ANIMATION_DURATION; @@ -240,8 +241,7 @@ public class FolderIcon extends FrameLayout implements FloatingIconViewCompanion mPreviewItemManager.recomputePreviewDrawingParams(); mBackground.getBounds(outBounds); // The preview items go outside of the bounds of the background. - Utilities.scaleRectAboutCenter(outBounds, - ClippedFolderIconLayoutRule.getIconOverlapFactor()); + Utilities.scaleRectAboutCenter(outBounds, ICON_OVERLAP_FACTOR); } public float getBackgroundStrokeWidth() { diff --git a/src/com/android/launcher3/folder/PreviewBackground.java b/src/com/android/launcher3/folder/PreviewBackground.java index ba8a290392..b0ca3492ec 100644 --- a/src/com/android/launcher3/folder/PreviewBackground.java +++ b/src/com/android/launcher3/folder/PreviewBackground.java @@ -18,6 +18,7 @@ package com.android.launcher3.folder; import static com.android.app.animation.Interpolators.ACCELERATE_DECELERATE; import static com.android.app.animation.Interpolators.EMPHASIZED_DECELERATE; +import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVERLAP_FACTOR; import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound; import android.animation.Animator; @@ -372,7 +373,7 @@ public class PreviewBackground extends DelegatedCellDrawing { public Path getClipPath() { mPath.reset(); - float radius = getScaledRadius() * ClippedFolderIconLayoutRule.getIconOverlapFactor(); + float radius = getScaledRadius() * ICON_OVERLAP_FACTOR; // Find the difference in radius so that the clip path remains centered. float radiusDifference = radius - getRadius(); float offsetX = basePreviewOffsetX - radiusDifference; diff --git a/src/com/android/launcher3/folder/PreviewItemManager.java b/src/com/android/launcher3/folder/PreviewItemManager.java index a81dbe03a3..e437b225e2 100644 --- a/src/com/android/launcher3/folder/PreviewItemManager.java +++ b/src/com/android/launcher3/folder/PreviewItemManager.java @@ -18,6 +18,7 @@ package com.android.launcher3.folder; import static com.android.launcher3.BubbleTextView.DISPLAY_FOLDER; import static com.android.launcher3.LauncherSettings.Favorites.DESKTOP_ICON_FLAG; +import static com.android.launcher3.Utilities.dpToPx; import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ENTER_INDEX; import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.EXIT_INDEX; import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW; @@ -116,7 +117,7 @@ public class PreviewItemManager { mIcon = icon; mIconSize = ActivityContext.lookupContext( mContext).getDeviceProfile().folderChildIconSizePx; - mClipThreshold = Utilities.dpToPx(1f); + mClipThreshold = dpToPx(1f); } /** @@ -160,7 +161,6 @@ public class PreviewItemManager { mIcon.getPaddingTop()); mIcon.mPreviewLayoutRule.init(mIcon.mBackground.previewSize, mIntrinsicIconSize, Utilities.isRtl(mIcon.getResources())); - updatePreviewItems(false); } } diff --git a/src/com/android/launcher3/graphics/ShapeDelegate.kt b/src/com/android/launcher3/graphics/ShapeDelegate.kt index 01bfe3018c..cd21f2a7fc 100644 --- a/src/com/android/launcher3/graphics/ShapeDelegate.kt +++ b/src/com/android/launcher3/graphics/ShapeDelegate.kt @@ -89,7 +89,6 @@ interface ShapeDelegate { } /** Rounded square with [radiusRatio] as a ratio of its half edge size */ - @VisibleForTesting open class RoundedSquare(val radiusRatio: Float) : ShapeDelegate { override fun drawShape( @@ -129,17 +128,17 @@ interface ShapeDelegate { ): ValueAnimator where T : View, T : ClipPathView { val startRadius = (startRect.width() / 2f) * radiusRatio return ClipAnimBuilder(target) { progress, path -> - val radius = (1 - progress) * startRadius + progress * endRadius - path.addRoundRect( - (1 - progress) * startRect.left + progress * endRect.left, - (1 - progress) * startRect.top + progress * endRect.top, - (1 - progress) * startRect.right + progress * endRect.right, - (1 - progress) * startRect.bottom + progress * endRect.bottom, - radius, - radius, - Path.Direction.CW, - ) - } + val radius = (1 - progress) * startRadius + progress * endRadius + path.addRoundRect( + (1 - progress) * startRect.left + progress * endRect.left, + (1 - progress) * startRect.top + progress * endRect.top, + (1 - progress) * startRect.right + progress * endRect.right, + (1 - progress) * startRect.bottom + progress * endRect.bottom, + radius, + radius, + Path.Direction.CW, + ) + } .toAnim(isReversed) } diff --git a/src/com/android/launcher3/graphics/ThemeManager.kt b/src/com/android/launcher3/graphics/ThemeManager.kt index 976386052a..6a1bb77f76 100644 --- a/src/com/android/launcher3/graphics/ThemeManager.kt +++ b/src/com/android/launcher3/graphics/ThemeManager.kt @@ -116,18 +116,19 @@ constructor( if (oldState != null && oldState.iconMask == iconMask) oldState.iconShape else pickBestShape(iconMask) - val folderShapeMask = shapeModel?.folderPathString ?: iconMask + val folderRadius = shapeModel?.folderRadiusRatio ?: 26f val folderShape = - when { - oldState != null && oldState.folderShapeMask == folderShapeMask -> - oldState.folderShape - folderShapeMask == iconMask || folderShapeMask.isEmpty() -> iconShape - else -> pickBestShape(folderShapeMask) + if (oldState != null && oldState.folderRadius == folderRadius) { + oldState.folderShape + } else if (folderRadius == 1f) { + ShapeDelegate.Circle() + } else { + ShapeDelegate.RoundedSquare(folderRadius) } return IconState( iconMask = iconMask, - folderShapeMask = folderShapeMask, + folderRadius = folderRadius, themeController = iconControllerFactory.createThemeController(), iconShape = iconShape, folderShape = folderShape, @@ -136,7 +137,7 @@ constructor( data class IconState( val iconMask: String, - val folderShapeMask: String, + val folderRadius: Float, val themeController: IconThemeController?, val themeCode: String = themeController?.themeID ?: "no-theme", val iconShape: ShapeDelegate, diff --git a/src/com/android/launcher3/shapes/IconShapeModel.kt b/src/com/android/launcher3/shapes/IconShapeModel.kt index a7fc12d03e..56e136ac3e 100644 --- a/src/com/android/launcher3/shapes/IconShapeModel.kt +++ b/src/com/android/launcher3/shapes/IconShapeModel.kt @@ -22,5 +22,6 @@ data class IconShapeModel( val key: String, @StringRes val titleId: Int, val pathString: String, - val folderPathString: String = pathString, + val folderRadiusRatio: Float = 1f, + val iconScale: Float = 1f, ) diff --git a/src/com/android/launcher3/shapes/ShapesProvider.kt b/src/com/android/launcher3/shapes/ShapesProvider.kt index 1bb59fa1b3..253ea52b77 100644 --- a/src/com/android/launcher3/shapes/ShapesProvider.kt +++ b/src/com/android/launcher3/shapes/ShapesProvider.kt @@ -21,14 +21,6 @@ import com.android.launcher3.R import com.android.systemui.shared.Flags object ShapesProvider { - private const val FOLDER_CLOVER_PATH = - "M 39.616 4 C 46.224 6.87 53.727 6.87 60.335 4 L 63.884 2.459 C 85.178 -6.789 106.789 14.822 97.541 36.116 L 96 39.665 C 93.13 46.273 93.13 53.776 96 60.384 L 97.541 63.934 C 106.789 85.227 85.178 106.839 63.884 97.591 L 60.335 96.049 C 53.727 93.179 46.224 93.179 39.616 96.049 L 36.066 97.591 C 14.773 106.839 -6.839 85.227 2.409 63.934 L 3.951 60.384 C 6.821 53.776 6.821 46.273 3.951 39.665 L 2.409 36.116 C -6.839 14.822 14.773 -6.789 36.066 2.459 Z" - private const val FOLDER_COMPLEX_CLOVER_PATH = - "M 49.85 6.764 L 50.013 6.971 L 50.175 6.764 C 53.422 2.635 58.309 0.207 63.538 0.207 C 65.872 0.207 68.175 0.692 70.381 1.648 L 71.79 2.264 L 71.792 2.265 A 3.46 3.46 0 0 0 74.515 2.265 L 74.517 2.264 L 75.926 1.652 A 17.1 17.1 0 0 1 82.769 0.207 C 88.495 0.207 93.824 3.117 97.022 7.989 C 100.21 12.848 100.697 18.712 98.36 24.087 L 97.749 25.496 V 25.497 A 3.45 3.45 0 0 0 97.749 28.222 V 28.223 L 98.36 29.632 C 100.697 35.007 100.207 40.871 97.022 45.73 A 17.5 17.5 0 0 1 93.264 49.838 L 93.06 50 L 93.264 50.162 A 17.5 17.5 0 0 1 97.022 54.27 C 100.21 59.129 100.697 64.993 98.36 70.368 V 71.778 A 3.45 3.45 0 0 0 97.749 74.503 V 74.504 L 98.36 75.913 C 100.697 81.288 100.207 87.152 97.022 92.011 C 93.824 96.883 88.495 99.793 82.769 99.793 C 80.435 99.793 78.132 99.308 75.926 98.348 L 74.517 97.736 H 74.515 A 3.5 3.5 0 0 0 73.153 97.455 C 72.682 97.455 72.225 97.552 71.792 97.736 H 71.79 L 70.381 98.348 A 17.1 17.1 0 0 1 63.538 99.793 C 58.309 99.793 53.422 97.365 50.175 93.236 L 50.013 93.029 L 49.85 93.236 C 46.603 97.365 41.717 99.793 36.488 99.793 C 34.154 99.793 31.851 99.308 29.645 98.348 L 28.236 97.736 H 28.234 A 3.5 3.5 0 0 0 26.872 97.455 C 26.401 97.455 25.944 97.552 25.511 97.736 H 25.509 L 24.1 98.348 A 17.1 17.1 0 0 1 17.257 99.793 C 11.53 99.793 6.202 96.883 3.004 92.011 C -0.181 87.152 -0.671 81.288 1.661 75.913 L 2.277 74.504 V 74.503 A 3.45 3.45 0 0 0 2.277 71.778 V 71.777 L 1.665 70.368 C -0.671 64.993 -0.181 59.129 3.004 54.274 A 17.5 17.5 0 0 1 6.761 50.162 L 6.965 50 L 6.761 49.838 A 17.5 17.5 0 0 1 3.004 45.73 C -0.181 40.871 -0.671 35.007 1.665 29.632 L 2.277 28.223 V 28.222 A 3.45 3.45 0 0 0 2.277 25.497 V 25.496 L 1.665 24.087 C -0.671 18.712 -0.181 12.848 3.004 7.994 V 7.993 C 6.202 3.117 11.53 0.207 17.257 0.207 C 19.591 0.207 21.894 0.692 24.1 1.652 L 25.509 2.264 L 25.511 2.265 A 3.46 3.46 0 0 0 28.234 2.265 L 28.236 2.264 L 29.645 1.652 A 17.1 17.1 0 0 1 36.488 0.207 C 41.717 0.207 46.603 2.635 49.85 6.764 Z" - private const val FOLDER_ARCH_PATH = - "M 50 0 L 72.5 0 A 27.5 27.5 0 0 1 100 27.5 L 100 86.67 A 13.33 13.33 0 0 1 86.67 100 L 13.33 100 A 13.33 13.33 0 0 1 0 86.67 L 0 27.5 A 27.5 27.5 0 0 1 27.5 0 Z" - private const val FOLDER_SQUARE_PATH = - "M 50 0 L 83.4 0 A 16.6 16.6 0 0 1 100 16.6 L 100 83.4 A 16.6 16.6 0 0 1 83.4 100 L 16.6 100 A 16.6 16.6 0 0 1 0 83.4 L 0 16.6 A 16.6 16.6 0 0 1 16.6 0 Z" private const val CIRCLE_PATH = "M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0" private const val SQUARE_PATH = "M53.689 0.82 L53.689 .82 C67.434 .82 74.306 .82 79.758 2.978 87.649 6.103 93.897 12.351 97.022 20.242 99.18 25.694 99.18 32.566 99.18 46.311 V53.689 C99.18 67.434 99.18 74.306 97.022 79.758 93.897 87.649 87.649 93.897 79.758 97.022 74.306 99.18 67.434 99.18 53.689 99.18 H46.311 C32.566 99.18 25.694 99.18 20.242 97.022 12.351 93.897 6.103 87.649 2.978 79.758 .82 74.306 .82 67.434 .82 53.689 L.82 46.311 C.82 32.566 .82 25.694 2.978 20.242 6.103 12.351 12.351 6.103 20.242 2.978 25.694 .82 32.566 .82 46.311 .82Z" @@ -51,31 +43,26 @@ object ShapesProvider { key = CIRCLE_KEY, titleId = R.string.circle_shape_title, pathString = CIRCLE_PATH, - folderPathString = FOLDER_CLOVER_PATH, ), IconShapeModel( key = SQUARE_KEY, titleId = R.string.square_shape_title, pathString = SQUARE_PATH, - folderPathString = FOLDER_SQUARE_PATH, ), IconShapeModel( key = FOUR_SIDED_COOKIE_KEY, titleId = R.string.four_sided_cookie_shape_title, pathString = FOUR_SIDED_COOKIE_PATH, - folderPathString = FOLDER_COMPLEX_CLOVER_PATH, ), IconShapeModel( key = SEVEN_SIDED_COOKIE_KEY, titleId = R.string.seven_sided_cookie_shape_title, pathString = SEVEN_SIDED_COOKIE_PATH, - folderPathString = FOLDER_CLOVER_PATH, ), IconShapeModel( key = ARCH_KEY, titleId = R.string.arch_shape_title, pathString = ARCH_PATH, - folderPathString = FOLDER_ARCH_PATH, ), ) } else { diff --git a/tests/multivalentTests/src/com/android/launcher3/shapes/ShapesProviderTest.kt b/tests/multivalentTests/src/com/android/launcher3/shapes/ShapesProviderTest.kt index 66b8be0229..b2ec6b7231 100644 --- a/tests/multivalentTests/src/com/android/launcher3/shapes/ShapesProviderTest.kt +++ b/tests/multivalentTests/src/com/android/launcher3/shapes/ShapesProviderTest.kt @@ -27,7 +27,6 @@ import com.android.launcher3.shapes.ShapesProvider.ARCH_KEY import com.android.launcher3.shapes.ShapesProvider.CIRCLE_KEY import com.android.launcher3.shapes.ShapesProvider.FOUR_SIDED_COOKIE_KEY import com.android.launcher3.shapes.ShapesProvider.SEVEN_SIDED_COOKIE_KEY -import com.android.launcher3.shapes.ShapesProvider.SQUARE_KEY import com.android.systemui.shared.Flags.FLAG_NEW_CUSTOMIZATION_PICKER_UI import org.junit.Rule import org.junit.Test @@ -93,48 +92,4 @@ class ShapesProviderTest { PathParser.createPathFromPathData(pathString) } } - - @Test - @EnableFlags(FLAG_ENABLE_LAUNCHER_ICON_SHAPES, FLAG_NEW_CUSTOMIZATION_PICKER_UI) - fun `verify valid folder path clover`() { - ShapesProvider.iconShapes - .find { it.key == CIRCLE_KEY }!! - .run { - GenericPathShape(folderPathString) - PathParser.createPathFromPathData(folderPathString) - } - } - - @Test - @EnableFlags(FLAG_ENABLE_LAUNCHER_ICON_SHAPES, FLAG_NEW_CUSTOMIZATION_PICKER_UI) - fun `verify valid folder path complexClover`() { - ShapesProvider.iconShapes - .find { it.key == FOUR_SIDED_COOKIE_KEY }!! - .run { - GenericPathShape(folderPathString) - PathParser.createPathFromPathData(folderPathString) - } - } - - @Test - @EnableFlags(FLAG_ENABLE_LAUNCHER_ICON_SHAPES, FLAG_NEW_CUSTOMIZATION_PICKER_UI) - fun `verify valid folder path arch`() { - ShapesProvider.iconShapes - .find { it.key == ARCH_KEY }!! - .run { - GenericPathShape(folderPathString) - PathParser.createPathFromPathData(folderPathString) - } - } - - @Test - @EnableFlags(FLAG_ENABLE_LAUNCHER_ICON_SHAPES, FLAG_NEW_CUSTOMIZATION_PICKER_UI) - fun `verify valid folder path square`() { - ShapesProvider.iconShapes - .find { it.key == SQUARE_KEY }!! - .run { - GenericPathShape(folderPathString) - PathParser.createPathFromPathData(folderPathString) - } - } }