From 44935cf67813bcf5bfd5bdc07ca1ac2a2a367fb6 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Wed, 12 Apr 2023 13:59:03 -0400 Subject: [PATCH] Update notification dots in Taskbar All Apps. AllAppsStore already has the business logic for this, we just were not piping along to it. Test: Dismiss notification from tray while All Apps is open, and dot should go away in All Apps. Fix: 277925243 Change-Id: I29c5723fd77d22f683f5518bd6e2e3206ddee999 --- .../launcher3/taskbar/TaskbarPopupController.java | 1 + .../taskbar/allapps/TaskbarAllAppsController.java | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarPopupController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarPopupController.java index 90fcd37d2e..5abeac7654 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarPopupController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarPopupController.java @@ -137,6 +137,7 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba if (folder != null) { folder.iterateOverItems(op); } + mControllers.taskbarAllAppsController.updateNotificationDots(updatedDots); } /** diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java index 4a95a8f718..0c9dc5b9e3 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java @@ -24,8 +24,10 @@ import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.taskbar.TaskbarControllers; import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext; +import com.android.launcher3.util.PackageUserKey; import java.util.List; +import java.util.function.Predicate; /** * Handles the all apps overlay window initialization, updates, and its data. @@ -91,6 +93,13 @@ public final class TaskbarAllAppsController { } } + /** Updates the current notification dots. */ + public void updateNotificationDots(Predicate updatedDots) { + if (mAppsView != null) { + mAppsView.getAppsStore().updateNotificationDots(updatedDots); + } + } + /** Opens the {@link TaskbarAllAppsContainerView} in a new window. */ public void show() { show(true); @@ -135,7 +144,6 @@ public final class TaskbarAllAppsController { overlayContext.getDragController().setDisallowLongClick(mDisallowLongClick); } - @VisibleForTesting public int getTaskbarAllAppsTopPadding() { // Allow null-pointer since this should only be null if the apps view is not showing.