Introduce PathWrapper that also tracks bounds and radii

So that we can use the bounds to set on BackgroundBlurDrawable

Bug: 445467156
Test: manual in the next CL
Flag: EXEMPT BUGFIX
Change-Id: I002d9dfd1d1aabc90c5cd6097772103575d91de9
This commit is contained in:
Tracy Zhou authored and Pun Butrach committed 2026-10-26 00:15:03 +07:00
1 parent c754a217b9
commit 2efdc9b814
9 files changed
+116 -39

No files matched your search

@@ -24,7 +24,6 @@ import static com.android.launcher3.folder.FolderGridOrganizer.createFolderGridO
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Point;
import android.util.ArrayMap;
import android.util.AttributeSet;
@@ -46,6 +45,7 @@ import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Utilities;
import com.android.launcher3.apppairs.AppPairIcon;
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
import com.android.launcher3.graphics.PathWrapper;
import com.android.launcher3.keyboard.ViewGroupFocusHelper;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.AppPairInfo;
@@ -99,7 +99,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
private Folder mFolder;
private Path mClipPath;
private PathWrapper mClipPath;
// If the views are attached to the folder or not. A folder should be bound when its
// animating or is open.
@@ -157,7 +157,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
protected void dispatchDraw(Canvas canvas) {
if (mClipPath != null) {
int count = canvas.save();
canvas.clipPath(mClipPath);
canvas.clipPath(mClipPath.getPath());
mFocusIndicatorHelper.draw(canvas);
super.dispatchDraw(canvas);
canvas.restoreToCount(count);
@@ -818,7 +818,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
}
@Override
public void setClipPath(Path clipPath) {
public void setClipPath(PathWrapper clipPath) {
mClipPath = clipPath;
invalidate();
}