Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d215285a authored by Steve Elliott's avatar Steve Elliott Committed by Android (Google) Code Review
Browse files

Merge "Remove NotifGroupManagerLegacy usage from Bubbles" into tm-qpr-dev

parents 1035f8a3 9e0b961c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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 */);
                    }
+0 −4
Original line number Diff line number Diff line
@@ -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);
+0 −4
Original line number Diff line number Diff line
@@ -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,
+4 −27
Original line number Diff line number Diff line
@@ -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;
@@ -330,16 +324,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(() -> {
@@ -350,16 +334,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(() -> {
@@ -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);
    }
+0 −4
Original line number Diff line number Diff line
@@ -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,