Remove NotifGroupManagerLegacy usage from Bubbles

Bug: 200269355
Test: atest SystemUITests
Change-Id: If996315ae55f9f5b13159345b01bcea8f07a0ba4
This commit is contained in:
Steve Elliott
2022-08-23 15:30:46 -04:00
parent 207bcfaf59
commit 9e0b961c12
5 changed files with 4 additions and 43 deletions

View File

@@ -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 */);
}

View File

@@ -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);

View File

@@ -61,7 +61,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;
@@ -219,11 +218,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,
@@ -237,7 +234,6 @@ public abstract class SystemUIModule {
interruptionStateProvider,
zenModeController,
notifUserManager,
groupManager,
notifCollection,
notifPipeline,
sysUiState,

View File

@@ -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);
}

View File

@@ -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,