From 20af12eb3809892b828922480b2393efbeccca6d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 1 Nov 2019 13:04:35 -0700 Subject: [PATCH] Maintain dot and text visibility if a new popup is created while closing Test: - Long press an icon to open the popup - Long press the same icon while the popup is open Previously, the dot would reappear (when the original popup finished closing). Now, the dot stays hidden, as it should since a popup is showing. Bug: 143639898 Change-Id: Ia0bdb626e02f4ad9ba12c27d94fea054b4afe50e --- .../android/launcher3/popup/PopupContainerWithArrow.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index 4833c26d82..e8ac1d4c93 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -575,8 +575,11 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource, @Override protected void closeComplete() { - mOriginalIcon.setTextVisibility(mOriginalIcon.shouldTextBeVisible()); - mOriginalIcon.setForceHideDot(false); + PopupContainerWithArrow openPopup = getOpen(mLauncher); + if (openPopup == null || openPopup.mOriginalIcon != mOriginalIcon) { + mOriginalIcon.setTextVisibility(mOriginalIcon.shouldTextBeVisible()); + mOriginalIcon.setForceHideDot(false); + } super.closeComplete(); }