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

Commit b061715f authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Automerger Merge Worker
Browse files

Merge "[CS] Remove CentralSurfaces from StatusBarNotificationPresenter." into...

Merge "[CS] Remove CentralSurfaces from StatusBarNotificationPresenter." into udc-qpr-dev am: cfc06ceb am: 23fae3dd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23986484



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


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