Fix notification dot not always being up to date.
- Prediction row views were never updated when notification changes.
- FloatingIconView set the BubbleTextView to force hide dot, but never restored it.
BubbleTextView is instanceof IconLabelDotView, so its already handled in the end runnable
Bug: 183360736
Test: 1. swipe up to go home such that the closing app has a notification,
note that the notification dot is properly updated
2. have all apps open
make notification update for a predicted app
ensure dot is properly updated
Change-Id: I35dacf9b71a3d8b8a857be450690d65ea9199bf6
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 {