diff options
| author | 2022-08-29 19:28:57 +0000 | |
|---|---|---|
| committer | 2022-08-29 19:28:57 +0000 | |
| commit | d215285a646bbe51518c919d3883e8c626d38bac (patch) | |
| tree | 82e917d06c0fd24de8ca0086a12c41f9426fcfc3 | |
| parent | 1035f8a36f58775efe87108f604c7c3f180bad8f (diff) | |
| parent | 9e0b961c128e7fb5d7b16519bac61af934eec5cb (diff) | |
Merge "Remove NotifGroupManagerLegacy usage from Bubbles" into tm-qpr-dev
5 files changed, 4 insertions, 43 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index dcbb272feab8..d63c25d07485 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -1387,9 +1387,6 @@ public class BubbleController implements ConfigurationChangeListener { if (update.selectionChanged && mStackView != null) { mStackView.setSelectedBubble(update.selectedBubble); - if (update.selectedBubble != null) { - mSysuiProxy.updateNotificationSuppression(update.selectedBubble.getKey()); - } } // Expanding? Apply this last. @@ -1448,7 +1445,6 @@ public class BubbleController implements ConfigurationChangeListener { // in the shade, it is essentially removed. Bubble bubbleChild = mBubbleData.getAnyBubbleWithkey(child.getKey()); if (bubbleChild != null) { - mSysuiProxy.removeNotificationEntry(bubbleChild.getKey()); bubbleChild.setSuppressNotification(true); bubbleChild.setShowDot(false /* show */); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java index 0e97e9e74114..453b34eb445c 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java @@ -278,12 +278,8 @@ public interface Bubbles { void notifyMaybeCancelSummary(String key); - void removeNotificationEntry(String key); - void updateNotificationBubbleButton(String key); - void updateNotificationSuppression(String key); - void onStackExpandChanged(boolean shouldExpand); void onManageMenuExpandChanged(boolean menuExpanded); diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java index 1b060e209579..a0ecd228edb4 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java @@ -65,7 +65,6 @@ import com.android.systemui.statusbar.QsFrameTranslateModule; import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl; -import com.android.systemui.statusbar.notification.collection.legacy.NotificationGroupManagerLegacy; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider; @@ -225,11 +224,9 @@ public abstract class SystemUIModule { NotificationInterruptStateProvider interruptionStateProvider, ZenModeController zenModeController, NotificationLockscreenUserManager notifUserManager, - NotificationGroupManagerLegacy groupManager, CommonNotifCollection notifCollection, NotifPipeline notifPipeline, SysUiState sysUiState, - DumpManager dumpManager, @Main Executor sysuiMainExecutor) { return Optional.ofNullable(BubblesManager.create(context, bubblesOptional, @@ -243,7 +240,6 @@ public abstract class SystemUIModule { interruptionStateProvider, zenModeController, notifUserManager, - groupManager, notifCollection, notifPipeline, sysUiState, diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java b/packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java index 199048ec7b2e..ce9674175bd5 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java @@ -62,7 +62,6 @@ import com.android.systemui.statusbar.notification.collection.NotifCollection; import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.coordinator.BubbleCoordinator; -import com.android.systemui.statusbar.notification.collection.legacy.NotificationGroupManagerLegacy; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.DismissedByUserStats; import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; @@ -103,7 +102,6 @@ public class BubblesManager { private final NotificationVisibilityProvider mVisibilityProvider; private final NotificationInterruptStateProvider mNotificationInterruptStateProvider; private final NotificationLockscreenUserManager mNotifUserManager; - private final NotificationGroupManagerLegacy mNotificationGroupManager; private final CommonNotifCollection mCommonNotifCollection; private final NotifPipeline mNotifPipeline; private final Executor mSysuiMainExecutor; @@ -130,7 +128,6 @@ public class BubblesManager { NotificationInterruptStateProvider interruptionStateProvider, ZenModeController zenModeController, NotificationLockscreenUserManager notifUserManager, - NotificationGroupManagerLegacy groupManager, CommonNotifCollection notifCollection, NotifPipeline notifPipeline, SysUiState sysUiState, @@ -148,7 +145,6 @@ public class BubblesManager { interruptionStateProvider, zenModeController, notifUserManager, - groupManager, notifCollection, notifPipeline, sysUiState, @@ -171,7 +167,6 @@ public class BubblesManager { NotificationInterruptStateProvider interruptionStateProvider, ZenModeController zenModeController, NotificationLockscreenUserManager notifUserManager, - NotificationGroupManagerLegacy groupManager, CommonNotifCollection notifCollection, NotifPipeline notifPipeline, SysUiState sysUiState, @@ -185,7 +180,6 @@ public class BubblesManager { mVisibilityProvider = visibilityProvider; mNotificationInterruptStateProvider = interruptionStateProvider; mNotifUserManager = notifUserManager; - mNotificationGroupManager = groupManager; mCommonNotifCollection = notifCollection; mNotifPipeline = notifPipeline; mSysuiMainExecutor = sysuiMainExecutor; @@ -331,16 +325,6 @@ public class BubblesManager { } @Override - public void removeNotificationEntry(String key) { - sysuiMainExecutor.execute(() -> { - final NotificationEntry entry = mCommonNotifCollection.getEntry(key); - if (entry != null) { - mNotificationGroupManager.onEntryRemoved(entry); - } - }); - } - - @Override public void updateNotificationBubbleButton(String key) { sysuiMainExecutor.execute(() -> { final NotificationEntry entry = mCommonNotifCollection.getEntry(key); @@ -351,16 +335,6 @@ public class BubblesManager { } @Override - public void updateNotificationSuppression(String key) { - sysuiMainExecutor.execute(() -> { - final NotificationEntry entry = mCommonNotifCollection.getEntry(key); - if (entry != null) { - mNotificationGroupManager.updateSuppression(entry); - } - }); - } - - @Override public void onStackExpandChanged(boolean shouldExpand) { sysuiMainExecutor.execute(() -> { sysUiState.setFlag(QuickStepContract.SYSUI_STATE_BUBBLES_EXPANDED, shouldExpand) @@ -532,7 +506,10 @@ public class BubblesManager { REASON_GROUP_SUMMARY_CANCELED); } } else { - mNotificationGroupManager.onEntryRemoved(entry); + for (NotifCallback cb : mCallbacks) { + cb.removeNotification(entry, getDismissedByUserStats(entry, true), + REASON_GROUP_SUMMARY_CANCELED); + } } }, mSysuiMainExecutor); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java index 5d63632725c2..09da52e7685c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java @@ -99,7 +99,6 @@ import com.android.systemui.statusbar.notification.NotifPipelineFlags; import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; -import com.android.systemui.statusbar.notification.collection.legacy.NotificationGroupManagerLegacy; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; @@ -162,8 +161,6 @@ public class BubblesTest extends SysuiTestCase { @Mock private CommonNotifCollection mCommonNotifCollection; @Mock - private NotificationGroupManagerLegacy mNotificationGroupManager; - @Mock private BubblesManager.NotifCallback mNotifCallback; @Mock private WindowManager mWindowManager; @@ -389,7 +386,6 @@ public class BubblesTest extends SysuiTestCase { interruptionStateProvider, mZenModeController, mLockscreenUserManager, - mNotificationGroupManager, mCommonNotifCollection, mNotifPipeline, mSysUiState, |