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

This commit is contained in:
Jonathan Miranda
2021-07-19 17:45:26 +00:00
committed by Android (Google) Code Review
3 changed files with 8 additions and 6 deletions

View File

@@ -96,6 +96,13 @@ public class PredictionRowView extends LinearLayout implements
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

View File

@@ -132,7 +132,7 @@ public class AllAppsStore {
}
public void registerIconContainer(ViewGroup container) {
if (container != null) {
if (container != null && !mIconContainers.contains(container)) {
mIconContainers.add(container);
}
}

View File

@@ -580,11 +580,6 @@ public class FloatingIconView extends FrameLayout implements
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 {