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

Commit f217e90e authored by Dave Mankoff's avatar Dave Mankoff Committed by Steve Elliott
Browse files

Remove ScrimController from NSSL

Move ScrimController from NotificationStackScrollLayout to
NotificationStackScrollLayoutController.

Bug: 147245740
Test: atest SystemUITests
Change-Id: Icb95446ee54cae7afae3bcc743ba2acd4e1e8742
parent d2587a6f
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -339,7 +339,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            = new HashSet<>();
    private final NotificationRoundnessManager mRoundnessManager;
    private boolean mTrackingHeadsUp;
    private ScrimController mScrimController;
    private boolean mForceNoOverlappingRendering;
    private final ArrayList<Pair<ExpandableNotificationRow, Boolean>> mTmpList = new ArrayList<>();
    private boolean mAnimationRunning;
@@ -927,7 +926,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    private void updateBackgroundDimming() {
    void updateBackgroundDimming() {
        // No need to update the background color if it's not being drawn.
        if (!mShouldDrawNotificationBackground) {
            return;
@@ -5171,12 +5170,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mRoundnessManager.setTrackingHeadsUp(row);
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public void setScrimController(ScrimController scrimController) {
        mScrimController = scrimController;
        mScrimController.setScrimBehindChangeRunnable(this::updateBackgroundDimming);
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public void forceNoOverlappingRendering(boolean force) {
        mForceNoOverlappingRendering = force;
+6 −5
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ public class NotificationStackScrollLayoutController {
    private final NotificationSectionsManager mNotificationSectionsManager;
    private final Resources mResources;
    private final NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder;
    private final ScrimController mScrimController;
    private final KeyguardMediaController mKeyguardMediaController;
    private final SysuiStatusBarStateController mStatusBarStateController;
    private final KeyguardBypassController mKeyguardBypassController;
@@ -495,7 +496,8 @@ public class NotificationStackScrollLayoutController {
            NotificationSectionsManager notificationSectionsManager,
            @Main Resources resources,
            NotificationSwipeHelper.Builder notificationSwipeHelperBuilder,
            StatusBar statusBar) {
            StatusBar statusBar,
            ScrimController scrimController) {
        mAllowLongPress = allowLongPress;
        mNotificationGutsManager = notificationGutsManager;
        mHeadsUpManager = headsUpManager;
@@ -515,6 +517,7 @@ public class NotificationStackScrollLayoutController {
        mResources = resources;
        mNotificationSwipeHelperBuilder = notificationSwipeHelperBuilder;
        mStatusBar = statusBar;
        mScrimController = scrimController;
    }

    public void attach(NotificationStackScrollLayout view) {
@@ -535,6 +538,8 @@ public class NotificationStackScrollLayoutController {
        mHeadsUpManager.setAnimationStateHandler(mView::setHeadsUpGoingAwayAnimationsAllowed);
        mDynamicPrivacyController.addListener(mDynamicPrivacyControllerListener);

        mScrimController.setScrimBehindChangeRunnable(mView::updateBackgroundDimming);

        mLockscreenUserManager.addUserChangedListener(mLockscreenUserChangeListener);
        mView.setCurrentUserid(mLockscreenUserManager.getCurrentUserId());

@@ -1011,10 +1016,6 @@ public class NotificationStackScrollLayoutController {
        mView.setShelfController(notificationShelfController);
    }

    public void setScrimController(ScrimController scrimController) {
        mView.setScrimController(scrimController);
    }

    public ExpandableView getFirstChildNotGone() {
        return mView.getFirstChildNotGone();
    }
+1 −3
Original line number Diff line number Diff line
@@ -3140,15 +3140,13 @@ public class NotificationPanelViewController extends PanelViewController {
    public void initDependencies(
            StatusBar statusBar,
            NotificationGroupManager groupManager,
            NotificationShelfController notificationShelfController,
            ScrimController scrimController) {
            NotificationShelfController notificationShelfController) {
        setStatusBar(statusBar);
        setGroupManager(mGroupManager);
        mNotificationStackScrollLayoutController.setNotificationPanelController(this);
        mNotificationStackScrollLayoutController.setStatusBar(statusBar);
        mNotificationStackScrollLayoutController.setGroupManager(groupManager);
        mNotificationStackScrollLayoutController.setShelfController(notificationShelfController);
        mNotificationStackScrollLayoutController.setScrimController(scrimController);
        updateShowEmptyShadeView();
        mNotificationShelfController = notificationShelfController;
        updateMaxDisplayedNotifications(true);
+1 −2
Original line number Diff line number Diff line
@@ -1160,8 +1160,7 @@ public class StatusBar extends SystemUI implements DemoMode,
        mNotificationPanelViewController.initDependencies(
                this,
                mGroupManager,
                mNotificationShelfController,
                mScrimController);
                mNotificationShelfController);

        BackDropView backdrop = mNotificationShadeWindowView.findViewById(R.id.backdrop);
        mMediaManager.setup(backdrop, backdrop.findViewById(R.id.backdrop_front),
+0 −1
Original line number Diff line number Diff line
@@ -217,7 +217,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        mStackScroller = spy(mStackScrollerInternal);
        mStackScroller.setShelfController(notificationShelfController);
        mStackScroller.setStatusBar(mBar);
        mStackScroller.setScrimController(mock(ScrimController.class));
        mStackScroller.setGroupManager(mGroupManager);
        mStackScroller.setEmptyShadeView(mEmptyShadeView);

Loading