From 7e045927fd9db89488cab625b11eb7c0ebfb2b54 Mon Sep 17 00:00:00 2001 From: Suphon Thanakornpakapong Date: Tue, 19 Oct 2021 10:20:36 +0700 Subject: [PATCH] Fix popup crash below q --- src/com/android/launcher3/popup/RoundedArrowDrawable.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/popup/RoundedArrowDrawable.java b/src/com/android/launcher3/popup/RoundedArrowDrawable.java index 4ad03aa767..ae25c107cd 100644 --- a/src/com/android/launcher3/popup/RoundedArrowDrawable.java +++ b/src/com/android/launcher3/popup/RoundedArrowDrawable.java @@ -70,8 +70,10 @@ public class RoundedArrowDrawable extends Drawable { // Make the drawable with the triangle pointing down and positioned on the left.. addDownPointingRoundedTriangleToPath(width, height, radius, mPath); - clipPopupBodyFromPath(popupRadius, popupWidth, popupHeight, arrowOffsetX, arrowOffsetY, - mPath); + if (Utilities.ATLEAST_Q) { + clipPopupBodyFromPath(popupRadius, popupWidth, popupHeight, arrowOffsetX, arrowOffsetY, + mPath); + } // ... then flip it horizontal or vertical based on where it will be used. Matrix pathTransform = new Matrix();