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

Commit 1f18fde6 authored by Steve Elliott's avatar Steve Elliott Committed by Android (Google) Code Review
Browse files

Merge changes I4a979715,I167b23a5

* changes:
  Move NotificationLockscreenUserManager out of NSSL
  Stop injection KeyguardBypassController into NSSL
parents 60f5ff4f aa6aff0e
Loading
Loading
Loading
Loading
+51 −101
Original line number Diff line number Diff line
@@ -95,21 +95,15 @@ import com.android.systemui.ExpandHelper;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.SwipeHelper;
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.media.KeyguardMediaController;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.MenuItem;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.OnMenuEventListener;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.DragDownHelper.DragDownCallback;
import com.android.systemui.statusbar.EmptyShadeView;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.NotificationShelfController;
@@ -145,7 +139,6 @@ import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;
import com.android.systemui.statusbar.phone.HeadsUpAppearanceController;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
@@ -192,10 +185,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
     * gap is drawn between them). In this case we don't want to round their corners.
     */
    private static final int DISTANCE_BETWEEN_ADJACENT_SECTIONS_PX = 1;
    private final KeyguardBypassController mKeyguardBypassController;
    private KeyguardBypassEnabledProvider mKeyguardBypassEnabledProvider;
    private final DynamicPrivacyController mDynamicPrivacyController;
    private final SysuiStatusBarStateController mStatusbarStateController;
    private final KeyguardMediaController mKeyguardMediaController;

    private ExpandHelper mExpandHelper;
    private final NotificationSwipeHelper mSwipeHelper;
@@ -246,6 +238,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private int mBottomMargin;
    private int mBottomInset = 0;
    private float mQsExpansionFraction;
    private int mCurrentUserId;

    /**
     * The algorithm which calculates the properties for our children
@@ -345,12 +338,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            return true;
        }
    };
    private final UserChangedListener mLockscreenUserChangeListener = new UserChangedListener() {
        @Override
        public void onUserChanged(int userId) {
            updateSensitiveness(false /* animated */);
        }
    };

    private StatusBar mStatusBar;
    private int[] mTempInt2 = new int[2];
    private boolean mGenerateChildOrderChangedEvent;
@@ -494,7 +482,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private ArrayList<BiConsumer<Float, Float>> mExpandedHeightListeners = new ArrayList<>();
    private int mHeadsUpInset;
    private HeadsUpAppearanceController mHeadsUpAppearanceController;
    private final NotificationLockscreenUserManager mLockscreenUserManager;
    private final Rect mTmpRect = new Rect();
    private final FeatureFlags mFeatureFlags;
    private final NotifPipeline mNotifPipeline;
@@ -507,7 +494,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    protected final UiEventLogger mUiEventLogger;
    private final NotificationRemoteInputManager mRemoteInputManager =
            Dependency.get(NotificationRemoteInputManager.class);
    private final SysuiColorExtractor mColorExtractor = Dependency.get(SysuiColorExtractor.class);

    private final DisplayMetrics mDisplayMetrics = Dependency.get(DisplayMetrics.class);
    private final LockscreenGestureLogger mLockscreenGestureLogger =
@@ -532,11 +518,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private int mWaterfallTopInset;
    private NotificationStackScrollLayoutController mController;

    private SysuiColorExtractor.OnColorsChangedListener mOnColorsChangedListener =
            (colorExtractor, which) -> {
                final boolean useDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
                updateDecorViews(useDarkText);
            };
    private boolean mKeyguardMediaControllorVisible;

    private final ExpandableView.OnHeightChangedListener mOnChildHeightChangedListener =
            new ExpandableView.OnHeightChangedListener() {
@@ -587,10 +569,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            DynamicPrivacyController dynamicPrivacyController,
            SysuiStatusBarStateController statusbarStateController,
            HeadsUpManagerPhone headsUpManager,
            KeyguardBypassController keyguardBypassController,
            KeyguardMediaController keyguardMediaController,
            FalsingManager falsingManager,
            NotificationLockscreenUserManager notificationLockscreenUserManager,
            NotificationGutsManager notificationGutsManager,
            NotificationSectionsManager notificationSectionsManager,
            ForegroundServiceSectionController fgsSectionController,
@@ -606,11 +585,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable

        mRoundnessManager = notificationRoundnessManager;

        mLockscreenUserManager = notificationLockscreenUserManager;
        mNotificationGutsManager = notificationGutsManager;
        mHeadsUpManager = headsUpManager;
        mHeadsUpManager.setAnimationStateHandler(this::setHeadsUpGoingAwayAnimationsAllowed);
        mKeyguardBypassController = keyguardBypassController;
        mFalsingManager = falsingManager;
        mFgsSectionController = fgsSectionController;

@@ -634,12 +611,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mSwipeHelper = new NotificationSwipeHelper(SwipeHelper.X, mNotificationCallback,
                getContext(), mMenuEventListener, mFalsingManager);
        mStackScrollAlgorithm = createStackScrollAlgorithm(context);
        initView(context);
        mShouldDrawNotificationBackground =
                res.getBoolean(R.bool.config_drawNotificationBackground);
        mFadeNotificationsOnDismiss =
                res.getBoolean(R.bool.config_fadeNotificationsOnDismiss);
        mLockscreenUserManager.addUserChangedListener(mLockscreenUserChangeListener);
        setOutlineProvider(mOutlineProvider);

        // Blocking helper manager wants to know the expanded state, update as well.
@@ -692,17 +667,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mStatusbarStateController = statusbarStateController;
        initializeForegroundServiceSection(fgsFeatureController);
        mUiEventLogger = uiEventLogger;
        mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener);
        mKeyguardMediaController = keyguardMediaController;
        keyguardMediaController.setVisibilityChangedListener((visible) -> {
            if (visible) {
                generateAddAnimation(keyguardMediaController.getView(), false /*fromMoreCard */);
            } else {
                generateRemoveAnimation(keyguardMediaController.getView());
            }
            requestChildrenUpdate();
            return null;
        });
    }

    private void initializeForegroundServiceSection(
@@ -741,7 +705,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    public float getWakeUpHeight() {
        ExpandableView firstChild = getFirstChildWithBackground();
        if (firstChild != null) {
            if (mKeyguardBypassController.getBypassEnabled()) {
            if (mKeyguardBypassEnabledProvider.getBypassEnabled()) {
                return firstChild.getHeadsUpHeightWithoutHeader();
            } else {
                return firstChild.getCollapsedHeight();
@@ -816,21 +780,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        };
    }

    @Override
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        ((SysuiStatusBarStateController) Dependency.get(StatusBarStateController.class))
                .addCallback(mStateListener, SysuiStatusBarStateController.RANK_STACK_SCROLLER);
    }

    @Override
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        Dependency.get(StatusBarStateController.class).removeCallback(mStateListener);
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public NotificationSwipeActionHelper getSwipeActionHelper() {
        return mSwipeHelper;
@@ -920,7 +869,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            }
        }
        boolean shouldDrawBackground;
        if (mKeyguardBypassController.getBypassEnabled() && onKeyguard()) {
        if (mKeyguardBypassEnabledProvider.getBypassEnabled() && onKeyguard()) {
            shouldDrawBackground = isPulseExpanding();
        } else {
            shouldDrawBackground = !mAmbientState.isDozing() || anySectionHasVisibleChild;
@@ -1035,9 +984,16 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        }
    }

    private void reinitView() {
        initView(getContext(), mKeyguardBypassEnabledProvider);
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    private void initView(Context context) {
    void initView(Context context,
            KeyguardBypassEnabledProvider keyguardBypassEnabledProvider) {
        mScroller = new OverScroller(getContext());
        mKeyguardBypassEnabledProvider = keyguardBypassEnabledProvider;

        setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
        setClipChildren(false);
        final ViewConfiguration configuration = ViewConfiguration.get(context);
@@ -1309,7 +1265,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
    private void requestChildrenUpdate() {
    void requestChildrenUpdate() {
        if (!mChildrenUpdateRequested) {
            getViewTreeObserver().addOnPreDrawListener(mChildrenUpdater);
            mChildrenUpdateRequested = true;
@@ -1439,7 +1395,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private void notifyAppearChangedListeners() {
        float appear;
        float expandAmount;
        if (mKeyguardBypassController.getBypassEnabled() && onKeyguard()) {
        if (mKeyguardBypassEnabledProvider.getBypassEnabled() && onKeyguard()) {
            appear = calculateAppearFractionBypass();
            expandAmount = getPulseHeight();
        } else {
@@ -1841,7 +1797,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mSwipeHelper.setDensityScale(densityScale);
        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
        mSwipeHelper.setPagingTouchSlop(pagingTouchSlop);
        initView(getContext());
        reinitView();
    }

    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
@@ -2689,7 +2645,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        }
        boolean shiftPulsingWithFirst = mHeadsUpManager.getAllEntries().count() <= 1
                && (mAmbientState.isDozing()
                        || (mKeyguardBypassController.getBypassEnabled() && onKeyguard));
                        || (mKeyguardBypassEnabledProvider.getBypassEnabled() && onKeyguard));
        for (NotificationSection section : mSections) {
            int minBottomPosition = minTopPosition;
            if (section == lastSection) {
@@ -2960,7 +2916,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        } else {
            mTopPaddingOverflow = 0;
        }
        setTopPadding(topPadding, animate && !mKeyguardBypassController.getBypassEnabled());
        setTopPadding(topPadding, animate && !mKeyguardBypassEnabledProvider.getBypassEnabled());
        setExpandedHeight(mExpandedHeight);
    }

@@ -3118,7 +3074,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
     * @return Whether an animation was generated.
     */
    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
    private boolean generateRemoveAnimation(ExpandableView child) {
    boolean generateRemoveAnimation(ExpandableView child) {
        if (removeRemovedChildFromHeadsUpChangeAnimations(child)) {
            mAddedHeadsUpChildren.remove(child);
            return false;
@@ -3355,7 +3311,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    @ShadeViewRefactor(RefactorComponent.COORDINATOR)
    void onViewAddedInternal(ExpandableView child) {
    private void onViewAddedInternal(ExpandableView child) {
        updateHideSensitiveForChild(child);
        child.setOnHeightChangedListener(mOnChildHeightChangedListener);
        generateAddAnimation(child, false /* fromMoreCard */);
@@ -3385,6 +3341,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        onViewRemovedInternal(row, childrenContainer);
    }

    public void notifyGroupChildAdded(ExpandableView row) {
        onViewAddedInternal(row);
    }

    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
    public void setAnimationsEnabled(boolean animationsEnabled) {
        mAnimationsEnabled = animationsEnabled;
@@ -3557,7 +3517,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            boolean performDisappearAnimation = !mIsExpanded
                    // Only animate if we still have pinned heads up, otherwise we just have the
                    // regular collapse animation of the lock screen
                    || (mKeyguardBypassController.getBypassEnabled() && onKeyguard()
                    || (mKeyguardBypassEnabledProvider.getBypassEnabled() && onKeyguard()
                            && mHeadsUpManager.hasPinnedHeadsUp());
            if (performDisappearAnimation && !isHeadsUp) {
                type = row.wasJustClicked()
@@ -4734,8 +4694,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    private void updateSensitiveness(boolean animate) {
        boolean hideSensitive = mLockscreenUserManager.isAnyProfilePublicMode();
    void updateSensitiveness(boolean animate, boolean hideSensitive) {
        if (hideSensitive != mAmbientState.isHideSensitive()) {
            int childCount = getChildCount();
            for (int i = 0; i < childCount; i++) {
@@ -4927,7 +4886,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        // Since we are clipping to the outline we need to make sure that the shadows aren't
        // clipped when pulsing
        float ownTranslationZ = 0;
        if (mKeyguardBypassController.getBypassEnabled() && mAmbientState.isHiddenAtAll()) {
        if (mKeyguardBypassEnabledProvider.getBypassEnabled() && mAmbientState.isHiddenAtAll()) {
            ExpandableView firstChildNotGone = getFirstChildNotGone();
            if (firstChildNotGone != null && firstChildNotGone.showingPulsing()) {
                ownTranslationZ = firstChildNotGone.getTranslationZ();
@@ -5093,7 +5052,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
    private void requestAnimateEverything() {
    void requestAnimateEverything() {
        if (mIsExpanded && mAnimationsEnabled) {
            mEverythingNeedsAnimation = true;
            mNeedsAnimation = true;
@@ -5431,17 +5390,17 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        mAmbientState.setStatusBarState(statusBarState);
    }

    private void onStatePostChange() {
    void onStatePostChange(boolean fromShadeLocked) {
        boolean onKeyguard = onKeyguard();

        mAmbientState.setActivatedChild(null);
        mAmbientState.setDimmed(onKeyguard);

        if (mHeadsUpAppearanceController != null) {
            mHeadsUpAppearanceController.onStateChanged();
        }

        SysuiStatusBarStateController state = (SysuiStatusBarStateController)
                Dependency.get(StatusBarStateController.class);
        updateSensitiveness(state.goingToFullShade() /* animate */);
        setDimmed(onKeyguard, state.fromShadeLocked() /* animate */);
        setDimmed(onKeyguard, fromShadeLocked);
        setExpandingEnabled(!onKeyguard);
        ActivatableNotificationView activatedChild = getActivatedChild();
        setActivatedChild(null);
@@ -5771,7 +5730,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
     */
    public float setPulseHeight(float height) {
        mAmbientState.setPulseHeight(height);
        if (mKeyguardBypassController.getBypassEnabled()) {
        if (mKeyguardBypassEnabledProvider.getBypassEnabled()) {
            notifyAppearChangedListeners();
        }
        requestChildrenUpdate();
@@ -5849,6 +5808,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        return mController;
    }

    void setCurrentUserid(int userId) {
        mCurrentUserId = userId;
    }

    /**
     * A listener that is notified when the empty space below the notifications is clicked on
     */
@@ -6204,26 +6167,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        }
    }

    @ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
    private final StateListener mStateListener = new StateListener() {
        @Override
        public void onStatePreChange(int oldState, int newState) {
            if (oldState == StatusBarState.SHADE_LOCKED && newState == StatusBarState.KEYGUARD) {
                requestAnimateEverything();
            }
        }

        @Override
        public void onStateChanged(int newState) {
            setStatusBarState(newState);
        }

        @Override
        public void onStatePostChange() {
          NotificationStackScrollLayout.this.onStatePostChange();
      }
    };

    @VisibleForTesting
    @ShadeViewRefactor(RefactorComponent.INPUT)
    protected final OnMenuEventListener mMenuEventListener = new OnMenuEventListener() {
@@ -6517,7 +6460,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            @SelectedRows int selectedRows) {
        if (mFeatureFlags.isNewNotifPipelineRenderingEnabled()) {
            if (selectedRows == ROWS_ALL) {
                mNotifCollection.dismissAllNotifications(mLockscreenUserManager.getCurrentUserId());
                mNotifCollection.dismissAllNotifications(mCurrentUserId);
            } else {
                final List<Pair<NotificationEntry, DismissedByUserStats>>
                        entriesWithRowsDismissedFromShade = new ArrayList<>();
@@ -6546,7 +6489,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            }
            if (selectedRows == ROWS_ALL) {
                try {
                    mBarService.onClearAllNotifications(mLockscreenUserManager.getCurrentUserId());
                    mBarService.onClearAllNotifications(mCurrentUserId);
                } catch (Exception ex) {
                }
            }
@@ -6568,6 +6511,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                    NotificationLogger.getNotificationLocation(entry)));
    }

    public void setKeyguardMediaControllorVisible(boolean keyguardMediaControllorVisible) {
        mKeyguardMediaControllorVisible = keyguardMediaControllorVisible;
    }

    // ---------------------- DragDownHelper.OnDragDownListener ------------------------------------

    @ShadeViewRefactor(RefactorComponent.INPUT)
@@ -6576,8 +6523,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        /* Only ever called as a consequence of a lockscreen expansion gesture. */
        @Override
        public boolean onDraggedDown(View startingChild, int dragLengthY) {
            boolean canDragDown = hasActiveNotifications()
                    || mKeyguardMediaController.getView().getVisibility() == VISIBLE;
            boolean canDragDown = hasActiveNotifications() || mKeyguardMediaControllorVisible;
            if (mStatusBarState == StatusBarState.KEYGUARD && canDragDown) {
                mLockscreenGestureLogger.write(
                        MetricsEvent.ACTION_LS_SHADE,
@@ -6655,7 +6601,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        @Override
        public boolean isDragDownAnywhereEnabled() {
            return mStatusbarStateController.getState() == StatusBarState.KEYGUARD
                    && !mKeyguardBypassController.getBypassEnabled();
                    && !mKeyguardBypassEnabledProvider.getBypassEnabled();
        }
    };

@@ -6838,4 +6784,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            return INVALID;
        }
    }

    interface KeyguardBypassEnabledProvider {
        boolean getBypassEnabled();
    }
}
+85 −3

File changed.

Preview size limit exceeded, changes collapsed.

+3 −23
Original line number Diff line number Diff line
@@ -54,12 +54,9 @@ import com.android.systemui.ExpandHelper;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.media.KeyguardMediaController;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.statusbar.EmptyShadeView;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener;
import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
@@ -87,15 +84,13 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.FooterView;
import com.android.systemui.statusbar.notification.row.NotificationBlockingHelperManager;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.KeyguardBypassEnabledProvider;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
import com.android.systemui.statusbar.phone.NotificationIconAreaController;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.util.leak.LeakDetector;

import org.junit.After;
@@ -136,14 +131,11 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
    @Mock private NotificationIconAreaController mNotificationIconAreaController;
    @Mock private MetricsLogger mMetricsLogger;
    @Mock private NotificationRoundnessManager mNotificationRoundnessManager;
    @Mock private KeyguardBypassController mKeyguardBypassController;
    @Mock private KeyguardBypassEnabledProvider mKeyguardBypassEnabledProvider;
    @Mock private NotificationSectionsManager mNotificationSectionsManager;
    @Mock private NotificationSection mNotificationSection;
    @Mock private NotificationLockscreenUserManager mLockscreenUserManager;
    @Mock private FeatureFlags mFeatureFlags;
    @Mock private KeyguardMediaController mKeyguardMediaController;
    @Mock private SysuiStatusBarStateController mStatusBarStateController;
    private UserChangedListener mUserChangedListener;
    private NotificationEntryManager mEntryManager;
    private int mOriginalInterruptionModelSetting;
    private UiEventLoggerFake mUiEventLoggerFake = new UiEventLoggerFake();
@@ -173,8 +165,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        mDependency.injectMockDependency(ShadeController.class);
        when(mRemoteInputManager.getController()).thenReturn(mRemoteInputController);

        ArgumentCaptor<UserChangedListener> userChangedCaptor = ArgumentCaptor
                .forClass(UserChangedListener.class);
        mEntryManager = new NotificationEntryManager(
                mock(NotificationEntryManagerLogger.class),
                mock(NotificationGroupManager.class),
@@ -219,10 +209,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
                mock(DynamicPrivacyController.class),
                mStatusBarStateController,
                mHeadsUpManager,
                mKeyguardBypassController,
                mKeyguardMediaController,
                new FalsingManagerFake(),
                mLockscreenUserManager,
                mock(NotificationGutsManager.class),
                mNotificationSectionsManager,
                mock(ForegroundServiceSectionController.class),
@@ -233,8 +220,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
                mock(NotifCollection.class),
                mUiEventLoggerFake
        );
        verify(mLockscreenUserManager).addUserChangedListener(userChangedCaptor.capture());
        mUserChangedListener = userChangedCaptor.getValue();
        mStackScrollerInternal.initView(getContext(), mKeyguardBypassEnabledProvider);
        mStackScroller = spy(mStackScrollerInternal);
        mStackScroller.setShelfController(notificationShelfController);
        mStackScroller.setStatusBar(mBar);
@@ -309,12 +295,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        verify(mBlockingHelperManager).setNotificationShadeExpanded(100f);
    }

    @Test
    public void testOnStatePostChange_verifyIfProfileIsPublic() {
        mUserChangedListener.onUserChanged(0);
        verify(mLockscreenUserManager).isAnyProfilePublicMode();
    }

    @Test
    public void manageNotifications_visible() {
        FooterView view = mock(FooterView.class);
+62 −4

File changed.

Preview size limit exceeded, changes collapsed.