Merge "Fix notification dot not always being up to date." into sc-dev am: 8e095ccb05

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15302020

Change-Id: I14464148a1f19023f937eb2449bcb3dac1493638
diff --git a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
index de04082..6afbf9a 100644
--- a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
+++ b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
@@ -96,6 +96,13 @@
 
     private void updateVisibility() {
         setVisibility(mPredictionsEnabled ? VISIBLE : GONE);
+        if (mLauncher.getAppsView() != null) {
+            if (mPredictionsEnabled) {
+                mLauncher.getAppsView().getAppsStore().registerIconContainer(this);
+            } else {
+                mLauncher.getAppsView().getAppsStore().unregisterIconContainer(this);
+            }
+        }
     }
 
     @Override
diff --git a/src/com/android/launcher3/allapps/AllAppsStore.java b/src/com/android/launcher3/allapps/AllAppsStore.java
index 2443b83..7bc3eec 100644
--- a/src/com/android/launcher3/allapps/AllAppsStore.java
+++ b/src/com/android/launcher3/allapps/AllAppsStore.java
@@ -132,7 +132,7 @@
     }
 
     public void registerIconContainer(ViewGroup container) {
-        if (container != null) {
+        if (container != null && !mIconContainers.contains(container)) {
             mIconContainers.add(container);
         }
     }
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index 3027db6..872adec 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -580,11 +580,6 @@
                     if (originalView instanceof IconLabelDotView) {
                         setIconAndDotVisible(originalView, true);
                     }
-                    if (originalView instanceof BubbleTextView) {
-                        BubbleTextView btv = (BubbleTextView) originalView;
-                        btv.setIconVisible(true);
-                        btv.setForceHideDot(true);
-                    }
                     view.finish(dragLayer);
                 }
             } else {