fix(android): path must be convex (#10238)

closes: #10235
This commit is contained in:
Osei Fortune
2023-03-16 15:33:00 -04:00
committed by GitHub
parent a23c8bda31
commit 89fc249880
2 changed files with 3 additions and 3 deletions

View File

@ -905,13 +905,13 @@ public class BorderDrawable extends ColorDrawable implements BitmapOwner {
};
outlineRectF.setEmpty();
outlineRectF.set(getBounds());
backgroundPath.addRoundRect(outlineRectF, backgroundRadii, Path.Direction.CW);
outlineBackgroundPath.addRoundRect(outlineRectF, backgroundRadii, Path.Direction.CW);
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// see setConvexPath notes
outline.setPath(backgroundPath);
outline.setPath(outlineBackgroundPath);
} else {
outline.setConvexPath(backgroundPath);
outline.setConvexPath(outlineBackgroundPath);
}
} else {