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

Commit 3ea610af authored by Caitlin Cassidy's avatar Caitlin Cassidy
Browse files

[Dagger] Inject NotificationEntryManager into

StatusBarNotificationPresenter.

Test: atest
Bug: 138786270
Change-Id: Ib84badab344205fe039c4b2d94531e6aaed06fb3
parent 98897a58
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
@@ -529,6 +530,7 @@ public class StatusBar extends SystemUI implements

    private final int[] mAbsPos = new int[2];

    protected final NotificationEntryManager mEntryManager;
    private final NotificationGutsManager mGutsManager;
    private final NotificationLogger mNotificationLogger;
    private final NotificationViewHierarchyManager mViewHierarchyManager;
@@ -805,6 +807,7 @@ public class StatusBar extends SystemUI implements
            FalsingManager falsingManager,
            FalsingCollector falsingCollector,
            BroadcastDispatcher broadcastDispatcher,
            NotificationEntryManager notificationEntryManager,
            NotificationGutsManager notificationGutsManager,
            NotificationLogger notificationLogger,
            NotificationInterruptStateProvider notificationInterruptStateProvider,
@@ -894,6 +897,7 @@ public class StatusBar extends SystemUI implements
        mFalsingCollector = falsingCollector;
        mFalsingManager = falsingManager;
        mBroadcastDispatcher = broadcastDispatcher;
        mEntryManager = notificationEntryManager;
        mGutsManager = notificationGutsManager;
        mNotificationLogger = notificationLogger;
        mNotificationInterruptStateProvider = notificationInterruptStateProvider;
@@ -1530,6 +1534,7 @@ public class StatusBar extends SystemUI implements
                mViewHierarchyManager,
                mLockscreenUserManager,
                mStatusBarStateController,
                mEntryManager,
                mMediaManager,
                mGutsManager,
                mKeyguardUpdateMonitor,
+3 −2
Original line number Diff line number Diff line
@@ -93,8 +93,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
    private final NotificationViewHierarchyManager mViewHierarchyManager;
    private final NotificationLockscreenUserManager mLockscreenUserManager;
    private final SysuiStatusBarStateController mStatusBarStateController;
    private final NotificationEntryManager mEntryManager =
            Dependency.get(NotificationEntryManager.class);
    private final NotificationEntryManager mEntryManager;
    private final NotificationMediaManager mMediaManager;
    private final NotificationGutsManager mGutsManager;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@@ -139,6 +138,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
            NotificationViewHierarchyManager notificationViewHierarchyManager,
            NotificationLockscreenUserManager lockscreenUserManager,
            SysuiStatusBarStateController sysuiStatusBarStateController,
            NotificationEntryManager notificationEntryManager,
            NotificationMediaManager notificationMediaManager,
            NotificationGutsManager notificationGutsManager,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -159,6 +159,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
        mViewHierarchyManager = notificationViewHierarchyManager;
        mLockscreenUserManager = lockscreenUserManager;
        mStatusBarStateController = sysuiStatusBarStateController;
        mEntryManager = notificationEntryManager;
        mMediaManager = notificationMediaManager;
        mGutsManager = notificationGutsManager;
        mKeyguardUpdateMonitor = keyguardUpdateMonitor;
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
import com.android.systemui.statusbar.notification.init.NotificationsController;
@@ -143,6 +144,7 @@ public interface StatusBarPhoneModule {
            FalsingManager falsingManager,
            FalsingCollector falsingCollector,
            BroadcastDispatcher broadcastDispatcher,
            NotificationEntryManager notificationEntryManager,
            NotificationGutsManager notificationGutsManager,
            NotificationLogger notificationLogger,
            NotificationInterruptStateProvider notificationInterruptStateProvider,
@@ -231,6 +233,7 @@ public interface StatusBarPhoneModule {
                falsingManager,
                falsingCollector,
                broadcastDispatcher,
                notificationEntryManager,
                notificationGutsManager,
                notificationLogger,
                notificationInterruptStateProvider,
+1 −3
Original line number Diff line number Diff line
@@ -96,9 +96,6 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
        mDependency.injectMockDependency(NotificationRemoteInputManager.Callback.class);
        mDependency.injectMockDependency(NotificationShadeWindowController.class);
        mDependency.injectMockDependency(ForegroundServiceNotificationListener.class);
        NotificationEntryManager entryManager =
                mDependency.injectMockDependency(NotificationEntryManager.class);
        when(entryManager.getActiveNotificationsForCurrentUser()).thenReturn(new ArrayList<>());

        NotificationShadeWindowView notificationShadeWindowView =
                mock(NotificationShadeWindowView.class);
@@ -122,6 +119,7 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
                mock(NotificationViewHierarchyManager.class),
                mock(NotificationLockscreenUserManager.class),
                mock(SysuiStatusBarStateController.class),
                mock(NotificationEntryManager.class),
                mock(NotificationMediaManager.class),
                mock(NotificationGutsManager.class),
                mock(KeyguardUpdateMonitor.class),
+2 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ public class StatusBarTest extends SysuiTestCase {
    @Mock private NotificationShadeWindowView mNotificationShadeWindowView;
    @Mock private BroadcastDispatcher mBroadcastDispatcher;
    @Mock private AssistManager mAssistManager;
    @Mock private NotificationEntryManager mNotificationEntryManager;
    @Mock private NotificationGutsManager mNotificationGutsManager;
    @Mock private NotificationMediaManager mNotificationMediaManager;
    @Mock private NavigationBarController mNavigationBarController;
@@ -359,6 +360,7 @@ public class StatusBarTest extends SysuiTestCase {
                new FalsingManagerFake(),
                new FalsingCollectorFake(),
                mBroadcastDispatcher,
                mNotificationEntryManager,
                mNotificationGutsManager,
                notificationLogger,
                mNotificationInterruptStateProvider,