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

Commit cfc06ceb authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Android (Google) Code Review
Browse files

Merge "[CS] Remove CentralSurfaces from StatusBarNotificationPresenter." into udc-qpr-dev

parents 3dd4ba5c 5fabec94
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
    private final HeadsUpManagerPhone mHeadsUpManager;
    private final AboveShelfObserver mAboveShelfObserver;
    private final DozeScrimController mDozeScrimController;
    private final CentralSurfaces mCentralSurfaces;
    private final NotificationsInteractor mNotificationsInteractor;
    private final NotificationStackScrollLayoutController mNsslController;
    private final LockscreenShadeTransitionController mShadeTransitionController;
@@ -107,7 +106,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
            NotificationShadeWindowController notificationShadeWindowController,
            DynamicPrivacyController dynamicPrivacyController,
            KeyguardStateController keyguardStateController,
            CentralSurfaces centralSurfaces,
            NotificationsInteractor notificationsInteractor,
            LockscreenShadeTransitionController shadeTransitionController,
            PowerInteractor powerInteractor,
@@ -128,8 +126,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
        mQsController = quickSettingsController;
        mHeadsUpManager = headsUp;
        mDynamicPrivacyController = dynamicPrivacyController;
        // TODO: use KeyguardStateController#isOccluded to remove this dependency
        mCentralSurfaces = centralSurfaces;
        mNotificationsInteractor = notificationsInteractor;
        mNsslController = stackScrollerController;
        mShadeTransitionController = shadeTransitionController;
@@ -283,7 +279,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu
        @Override
        public boolean suppressAwakeHeadsUp(NotificationEntry entry) {
            final StatusBarNotification sbn = entry.getSbn();
            if (mCentralSurfaces.isOccluded()) {
            if (mKeyguardStateController.isOccluded()) {
                boolean devicePublic = mLockscreenUserManager
                        .isLockscreenPublicMode(mLockscreenUserManager.getCurrentUserId());
                boolean userPublic = devicePublic
+0 −3
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
    private CommandQueue mCommandQueue;
    private FakeMetricsLogger mMetricsLogger;
    private final ShadeController mShadeController = mock(ShadeController.class);
    private final CentralSurfaces mCentralSurfaces = mock(CentralSurfaces.class);
    private final NotificationsInteractor mNotificationsInteractor =
            mock(NotificationsInteractor.class);
    private final KeyguardStateController mKeyguardStateController =
@@ -118,7 +117,6 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
                mock(NotificationShadeWindowController.class),
                mock(DynamicPrivacyController.class),
                mKeyguardStateController,
                mCentralSurfaces,
                mNotificationsInteractor,
                mock(LockscreenShadeTransitionController.class),
                mock(PowerInteractor.class),
@@ -202,7 +200,6 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {

        when(mKeyguardStateController.isShowing()).thenReturn(true);
        when(mKeyguardStateController.isOccluded()).thenReturn(false);
        when(mCentralSurfaces.isOccluded()).thenReturn(false);
        assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(entry));
    }