From a3f91c97528a52658271bfd480c81f24b0bdeb97 Mon Sep 17 00:00:00 2001 From: Mario Bertschler Date: Tue, 20 Jun 2017 14:08:11 -0700 Subject: [PATCH] PopupContainerWithArrow accepting bubbletextview without icon being set. Change-Id: I5f58c339c094b4a88adf27c2ecaa01ba052b2285 --- src/com/android/launcher3/popup/PopupContainerWithArrow.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index c5daca0e1f..77375fa485 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -459,7 +459,9 @@ public class PopupContainerWithArrow extends AbstractFloatingView implements Dra x += mIsLeftAligned ? xOffset : -xOffset; // Open above icon if there is room. - int iconHeight = icon.getIcon().getBounds().height(); + int iconHeight = icon.getIcon() != null + ? icon.getIcon().getBounds().height() + : icon.getHeight(); int y = mTempRect.top + icon.getPaddingTop() - height; mIsAboveIcon = y > dragLayer.getTop() + insets.top; if (!mIsAboveIcon) {