Eliminate StatusBarNotifActivityStarter.Builder

This CL adjusts the Dagger scoping for StatusBarNotifActivityStarter to
StatusBarScope, so that we don't need to use a Builder that was
previously scoped as SysUISingleton.

Test: mp droid, atest
Bug: 219939676
Change-Id: Iff2a298c19f89e234db2719fb0bc64e2b82c831b
This commit is contained in:
Steve Elliott
2022-02-24 14:41:07 -05:00
parent e15d10f33d
commit 309cc9dee7
23 changed files with 227 additions and 340 deletions

View File

@@ -18,6 +18,7 @@ package com.android.systemui.statusbar;
import android.view.View;
import com.android.systemui.statusbar.notification.row.ActivatableNotificationView;
import com.android.systemui.statusbar.notification.row.ActivatableNotificationViewController;
import com.android.systemui.statusbar.notification.row.dagger.NotificationRowScope;
import com.android.systemui.statusbar.notification.stack.AmbientState;
@@ -25,7 +26,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll
import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationIconContainer;
import com.android.systemui.statusbar.phone.StatusBarNotificationPresenter;
import javax.inject.Inject;
@@ -114,8 +114,8 @@ public class NotificationShelfController {
return mView.getIntrinsicHeight();
}
public void setOnActivatedListener(StatusBarNotificationPresenter presenter) {
mView.setOnActivatedListener(presenter);
public void setOnActivatedListener(ActivatableNotificationView.OnActivatedListener listener) {
mView.setOnActivatedListener(listener);
}
public void setOnClickListener(View.OnClickListener onClickListener) {

View File

@@ -8,12 +8,15 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent
import com.android.systemui.statusbar.policy.HeadsUpUtil
import javax.inject.Inject
import kotlin.math.ceil
import kotlin.math.max
/** A provider of [NotificationLaunchAnimatorController]. */
class NotificationLaunchAnimatorControllerProvider(
@StatusBarComponent.StatusBarScope
class NotificationLaunchAnimatorControllerProvider @Inject constructor(
private val notificationShadeWindowViewController: NotificationShadeWindowViewController,
private val notificationListContainer: NotificationListContainer,
private val headsUpManager: HeadsUpManagerPhone,

View File

@@ -94,6 +94,8 @@ import com.android.systemui.wmshell.BubblesManager;
import java.util.Optional;
import java.util.concurrent.Executor;
import javax.inject.Provider;
import dagger.Binds;
import dagger.Lazy;
import dagger.Module;
@@ -276,8 +278,8 @@ public interface NotificationsModule {
@Provides
static NotificationsController provideNotificationsController(
Context context,
Lazy<NotificationsControllerImpl> realController,
Lazy<NotificationsControllerStub> stubController) {
Provider<NotificationsControllerImpl> realController,
Provider<NotificationsControllerStub> stubController) {
if (context.getResources().getBoolean(R.bool.config_renderNotifications)) {
return realController.get();
} else {

View File

@@ -23,11 +23,8 @@ import com.android.systemui.statusbar.notification.NotificationActivityStarter
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl
import com.android.systemui.statusbar.notification.collection.render.NotifStackController
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import com.android.systemui.statusbar.phone.StatusBar
import com.android.wm.shell.bubbles.Bubbles
import java.io.FileDescriptor
import java.io.PrintWriter
import java.util.Optional
/**
* The master controller for all notifications-related work
@@ -37,8 +34,6 @@ import java.util.Optional
*/
interface NotificationsController {
fun initialize(
statusBar: StatusBar,
bubblesOptional: Optional<Bubbles>,
presenter: NotificationPresenter,
listContainer: NotificationListContainer,
stackController: NotifStackController,

View File

@@ -64,6 +64,7 @@ import javax.inject.Inject
*/
@SysUISingleton
class NotificationsControllerImpl @Inject constructor(
private val statusBar: Lazy<StatusBar>,
private val notifPipelineFlags: NotifPipelineFlags,
private val notificationListener: NotificationListener,
private val entryManager: NotificationEntryManager,
@@ -86,12 +87,11 @@ class NotificationsControllerImpl @Inject constructor(
private val headsUpViewBinder: HeadsUpViewBinder,
private val clickerBuilder: NotificationClicker.Builder,
private val animatedImageNotificationManager: AnimatedImageNotificationManager,
private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager
private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager,
private val bubblesOptional: Optional<Bubbles>,
) : NotificationsController {
override fun initialize(
statusBar: StatusBar,
bubblesOptional: Optional<Bubbles>,
presenter: NotificationPresenter,
listContainer: NotificationListContainer,
stackController: NotifStackController,
@@ -109,7 +109,7 @@ class NotificationsControllerImpl @Inject constructor(
notificationRowBinder.setNotificationClicker(
clickerBuilder.build(
Optional.of(statusBar), bubblesOptional, notificationActivityStarter))
Optional.of(statusBar.get()), bubblesOptional, notificationActivityStarter))
notificationRowBinder.setUpWithPresenter(
presenter,
listContainer,

View File

@@ -24,11 +24,8 @@ import com.android.systemui.statusbar.notification.NotificationActivityStarter
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl
import com.android.systemui.statusbar.notification.collection.render.NotifStackController
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import com.android.systemui.statusbar.phone.StatusBar
import com.android.wm.shell.bubbles.Bubbles
import java.io.FileDescriptor
import java.io.PrintWriter
import java.util.Optional
import javax.inject.Inject
/**
@@ -39,8 +36,6 @@ class NotificationsControllerStub @Inject constructor(
) : NotificationsController {
override fun initialize(
statusBar: StatusBar,
bubblesOptional: Optional<Bubbles>,
presenter: NotificationPresenter,
listContainer: NotificationListContainer,
stackController: NotifStackController,
@@ -75,4 +70,4 @@ class NotificationsControllerStub @Inject constructor(
pw.println("Notification handling disabled")
pw.println()
}
}
}

View File

@@ -1406,7 +1406,7 @@ public class NotificationStackScrollLayoutController {
return mNotificationRoundnessManager;
}
public NotificationListContainer getNotificationListContainer() {
NotificationListContainer getNotificationListContainer() {
return mNotificationListContainer;
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.statusbar.notification.stack;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import dagger.Module;
import dagger.Provides;
@Module
public abstract class NotificationStackScrollLayoutListContainerModule {
@Provides
@StatusBarComponent.StatusBarScope
static NotificationListContainer provideListContainer(
NotificationStackScrollLayoutController nsslController) {
return nsslController.getNotificationListContainer();
}
}

View File

@@ -184,6 +184,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.stack.AmbientState;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.MediaContainerView;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
@@ -665,6 +666,8 @@ public class NotificationPanelViewController extends PanelViewController
private final ListenerSet<Callbacks> mNotifEventSourceCallbacks = new ListenerSet<>();
private final NotificationListContainer mNotificationListContainer;
private View.AccessibilityDelegate mAccessibilityDelegate = new View.AccessibilityDelegate() {
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
@@ -792,7 +795,8 @@ public class NotificationPanelViewController extends PanelViewController
InteractionJankMonitor interactionJankMonitor,
QsFrameTranslateController qsFrameTranslateController,
SysUiState sysUiState,
KeyguardUnlockAnimationController keyguardUnlockAnimationController) {
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
NotificationListContainer notificationListContainer) {
super(view,
falsingManager,
dozeLog,
@@ -823,6 +827,7 @@ public class NotificationPanelViewController extends PanelViewController
mMediaHierarchyManager = mediaHierarchyManager;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mNotificationsQSContainerController = notificationsQSContainerController;
mNotificationListContainer = notificationListContainer;
mNotificationsQSContainerController.init();
mNotificationStackScrollLayoutController = notificationStackScrollLayoutController;
mGroupManager = groupManager;
@@ -4046,8 +4051,7 @@ public class NotificationPanelViewController extends PanelViewController
}
public boolean hasPulsingNotifications() {
return mNotificationStackScrollLayoutController
.getNotificationListContainer().hasPulsingNotifications();
return mNotificationListContainer.hasPulsingNotifications();
}
public ActivatableNotificationView getActivatedChild() {

View File

@@ -44,6 +44,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager;
import com.android.systemui.statusbar.window.StatusBarWindowStateController;
import com.android.systemui.tuner.TunerService;
@@ -57,6 +58,7 @@ import javax.inject.Inject;
/**
* Controller for {@link NotificationShadeWindowView}.
*/
@StatusBarComponent.StatusBarScope
public class NotificationShadeWindowViewController {
private static final String TAG = "NotifShadeWindowVC";
private final FalsingCollector mFalsingCollector;
@@ -77,8 +79,8 @@ public class NotificationShadeWindowViewController {
private boolean mExpandAnimationRunning;
private NotificationStackScrollLayout mStackScrollLayout;
private PhoneStatusBarViewController mStatusBarViewController;
private StatusBar mService;
private NotificationShadeWindowController mNotificationShadeWindowController;
private final StatusBar mService;
private final NotificationShadeWindowController mNotificationShadeWindowController;
private DragDownHelper mDragDownHelper;
private boolean mDoubleTapEnabled;
private boolean mSingleTapEnabled;
@@ -105,7 +107,9 @@ public class NotificationShadeWindowViewController {
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
StatusBarWindowStateController statusBarWindowStateController,
LockIconViewController lockIconViewController,
Optional<LowLightClockController> lowLightClockController) {
Optional<LowLightClockController> lowLightClockController,
StatusBar statusBar,
NotificationShadeWindowController controller) {
mLockscreenShadeTransitionController = transitionController;
mFalsingCollector = falsingCollector;
mTunerService = tunerService;
@@ -120,6 +124,8 @@ public class NotificationShadeWindowViewController {
mStatusBarWindowStateController = statusBarWindowStateController;
mLockIconViewController = lockIconViewController;
mLowLightClockController = lowLightClockController;
mService = statusBar;
mNotificationShadeWindowController = controller;
// This view is not part of the newly inflated expanded status bar.
mBrightnessMirror = mView.findViewById(R.id.brightness_mirror_container);
@@ -452,11 +458,6 @@ public class NotificationShadeWindowViewController {
mStatusBarViewController = statusBarViewController;
}
public void setService(StatusBar statusBar, NotificationShadeWindowController controller) {
mService = statusBar;
mNotificationShadeWindowController = controller;
}
/**
* Tell the controller that dozing has begun or ended.
* @param dozing True if dozing has begun.

View File

@@ -345,6 +345,7 @@ public class StatusBar extends CoreStartable implements
private final DreamOverlayStateController mDreamOverlayStateController;
private StatusBarCommandQueueCallbacks mCommandQueueCallbacks;
private float mTransitionToFullShadeProgress = 0f;
private NotificationListContainer mNotifListContainer;
void onStatusBarWindowStateChanged(@WindowVisibleState int state) {
updateBubblesVisibility();
@@ -468,7 +469,7 @@ public class StatusBar extends CoreStartable implements
private PhoneStatusBarTransitions mStatusBarTransitions;
private AuthRippleController mAuthRippleController;
@WindowVisibleState private int mStatusBarWindowState = WINDOW_STATE_SHOWING;
protected NotificationShadeWindowController mNotificationShadeWindowController;
protected final NotificationShadeWindowController mNotificationShadeWindowController;
private final StatusBarWindowController mStatusBarWindowController;
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@VisibleForTesting
@@ -496,8 +497,6 @@ public class StatusBar extends CoreStartable implements
private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy;
private final StatusBarComponent.Factory mStatusBarComponentFactory;
private final PluginManager mPluginManager;
private final StatusBarNotificationActivityStarter.Builder
mStatusBarNotificationActivityStarterBuilder;
private final ShadeController mShadeController;
private final InitController mInitController;
@@ -665,7 +664,7 @@ public class StatusBar extends CoreStartable implements
private final ActivityLaunchAnimator mActivityLaunchAnimator;
private NotificationLaunchAnimatorControllerProvider mNotificationAnimationProvider;
protected StatusBarNotificationPresenter mPresenter;
protected NotificationPresenter mPresenter;
private NotificationActivityStarter mNotificationActivityStarter;
private final Lazy<NotificationShadeDepthController> mNotificationShadeDepthControllerLazy;
private final Optional<BubblesManager> mBubblesManagerOptional;
@@ -752,8 +751,6 @@ public class StatusBar extends CoreStartable implements
CommandQueue commandQueue,
StatusBarComponent.Factory statusBarComponentFactory,
PluginManager pluginManager,
StatusBarNotificationActivityStarter.Builder
statusBarNotificationActivityStarterBuilder,
ShadeController shadeController,
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
ViewMediatorCallback viewMediatorCallback,
@@ -850,7 +847,6 @@ public class StatusBar extends CoreStartable implements
mCommandQueue = commandQueue;
mStatusBarComponentFactory = statusBarComponentFactory;
mPluginManager = pluginManager;
mStatusBarNotificationActivityStarterBuilder = statusBarNotificationActivityStarterBuilder;
mShadeController = shadeController;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mKeyguardViewMediatorCallback = viewMediatorCallback;
@@ -1155,19 +1151,14 @@ public class StatusBar extends CoreStartable implements
updateTheme();
inflateStatusBarWindow();
mNotificationShadeWindowViewController.setService(this, mNotificationShadeWindowController);
mNotificationShadeWindowView.setOnTouchListener(getStatusBarWindowTouchListener());
mWallpaperController.setRootView(mNotificationShadeWindowView);
// TODO: Deal with the ugliness that comes from having some of the statusbar broken out
// into fragments, but the rest here, it leaves some awkward lifecycle and whatnot.
NotificationListContainer notifListContainer =
mStackScrollerController.getNotificationListContainer();
mNotificationLogger.setUpWithContainer(notifListContainer);
mNotificationLogger.setUpWithContainer(mNotifListContainer);
mNotificationIconAreaController.setupShelf(mNotificationShelfController);
mPanelExpansionStateManager.addExpansionListener(mWakeUpCoordinator);
mUserSwitcherController.init(mNotificationShadeWindowView);
// Allow plugins to reference DarkIconDispatcher and StatusBarStateController
@@ -1442,65 +1433,19 @@ public class StatusBar extends CoreStartable implements
mActivityLaunchAnimator.addListener(mActivityLaunchAnimatorListener);
mNotificationAnimationProvider = new NotificationLaunchAnimatorControllerProvider(
mNotificationShadeWindowViewController,
mStackScrollerController.getNotificationListContainer(),
mNotifListContainer,
mHeadsUpManager,
mJankMonitor
);
// TODO: inject this.
mPresenter = new StatusBarNotificationPresenter(
mContext,
mNotificationPanelViewController,
mHeadsUpManager,
mNotificationShadeWindowView,
mStackScrollerController,
mDozeScrimController,
mScrimController,
mNotificationShadeWindowController,
mDynamicPrivacyController,
mKeyguardStateController,
mKeyguardIndicationController,
this /* statusBar */,
mShadeController,
mLockscreenShadeTransitionController,
mCommandQueue,
mViewHierarchyManager,
mLockscreenUserManager,
mStatusBarStateController,
mNotifShadeEventSource,
mEntryManager,
mMediaManager,
mGutsManager,
mKeyguardUpdateMonitor,
mLockscreenGestureLogger,
mInitController,
mNotificationInterruptStateProvider,
mRemoteInputManager,
mConfigurationController,
mNotifPipelineFlags);
mJankMonitor);
mNotificationShelfController.setOnActivatedListener(mPresenter);
mRemoteInputManager.addControllerCallback(mNotificationShadeWindowController);
mNotificationActivityStarter =
mStatusBarNotificationActivityStarterBuilder
.setStatusBar(this)
.setActivityLaunchAnimator(mActivityLaunchAnimator)
.setNotificationAnimatorControllerProvider(mNotificationAnimationProvider)
.setNotificationPresenter(mPresenter)
.setNotificationPanelViewController(mNotificationPanelViewController)
.build();
mStackScrollerController.setNotificationActivityStarter(mNotificationActivityStarter);
mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter);
mNotificationsController.initialize(
this,
mBubblesOptional,
mPresenter,
mStackScrollerController.getNotificationListContainer(),
mNotifListContainer,
mStackScrollerController.getNotifStackController(),
mNotificationActivityStarter,
mPresenter);
mStatusBarComponent.getBindRowCallback());
}
/**
@@ -1576,9 +1521,12 @@ public class StatusBar extends CoreStartable implements
mStatusBarComponent.getLockIconViewController().init();
mStackScrollerController = mStatusBarComponent.getNotificationStackScrollLayoutController();
mStackScroller = mStackScrollerController.getView();
mNotifListContainer = mStatusBarComponent.getNotificationListContainer();
mPresenter = mStatusBarComponent.getNotificationPresenter();
mNotificationActivityStarter = mStatusBarComponent.getNotificationActivityStarter();
mNotificationShelfController = mStatusBarComponent.getNotificationShelfController();
mAuthRippleController = mStatusBarComponent.getAuthRippleController();
mAuthRippleController.init();
mHeadsUpManager.addListener(mStatusBarComponent.getStatusBarHeadsUpChangeListener());

View File

@@ -51,9 +51,6 @@ import com.android.systemui.ActivityIntentHelper;
import com.android.systemui.EventLogTags;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.assist.AssistManager;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dagger.qualifiers.UiBackground;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.CommandQueue;
@@ -75,6 +72,7 @@ import com.android.systemui.statusbar.notification.interruption.NotificationInte
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowDragController;
import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.policy.HeadsUpUtil;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.wmshell.BubblesManager;
@@ -89,7 +87,8 @@ import dagger.Lazy;
/**
* Status bar implementation of {@link NotificationActivityStarter}.
*/
public class StatusBarNotificationActivityStarter implements NotificationActivityStarter {
@StatusBarComponent.StatusBarScope
class StatusBarNotificationActivityStarter implements NotificationActivityStarter {
private final Context mContext;
@@ -132,7 +131,8 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
private boolean mIsCollapsingToShowActivityOverLockscreen;
private StatusBarNotificationActivityStarter(
@Inject
StatusBarNotificationActivityStarter(
Context context,
CommandQueue commandQueue,
Handler mainThreadHandler,
@@ -657,180 +657,4 @@ public class StatusBarNotificationActivityStarter implements NotificationActivit
return entry.shouldSuppressFullScreenIntent();
}
// --------------------- NotificationEntryManager/NotifPipeline methods ------------------------
/**
* Public builder for {@link StatusBarNotificationActivityStarter}.
*/
@SysUISingleton
public static class Builder {
private final Context mContext;
private final CommandQueue mCommandQueue;
private final Handler mMainThreadHandler;
private final Executor mUiBgExecutor;
private final NotificationEntryManager mEntryManager;
private final NotifPipeline mNotifPipeline;
private final NotificationVisibilityProvider mVisibilityProvider;
private final HeadsUpManagerPhone mHeadsUpManager;
private final ActivityStarter mActivityStarter;
private final NotificationClickNotifier mClickNotifier;
private final StatusBarStateController mStatusBarStateController;
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private final KeyguardManager mKeyguardManager;
private final IDreamManager mDreamManager;
private final Optional<BubblesManager> mBubblesManagerOptional;
private final Lazy<AssistManager> mAssistManagerLazy;
private final NotificationRemoteInputManager mRemoteInputManager;
private final GroupMembershipManager mGroupMembershipManager;
private final NotificationLockscreenUserManager mLockscreenUserManager;
private final ShadeController mShadeController;
private final KeyguardStateController mKeyguardStateController;
private final NotificationInterruptStateProvider mNotificationInterruptStateProvider;
private final LockPatternUtils mLockPatternUtils;
private final StatusBarRemoteInputCallback mRemoteInputCallback;
private final ActivityIntentHelper mActivityIntentHelper;;
private final MetricsLogger mMetricsLogger;
private final StatusBarNotificationActivityStarterLogger mLogger;
private final OnUserInteractionCallback mOnUserInteractionCallback;
private final NotifPipelineFlags mNotifPipelineFlags;
private StatusBar mStatusBar;
private NotificationPresenter mNotificationPresenter;
private NotificationPanelViewController mNotificationPanelViewController;
private ActivityLaunchAnimator mActivityLaunchAnimator;
private NotificationLaunchAnimatorControllerProvider mNotificationAnimationProvider;
@Inject
public Builder(
Context context,
CommandQueue commandQueue,
@Main Handler mainThreadHandler,
@UiBackground Executor uiBgExecutor,
NotificationEntryManager entryManager,
NotifPipeline notifPipeline,
NotificationVisibilityProvider visibilityProvider,
HeadsUpManagerPhone headsUpManager,
ActivityStarter activityStarter,
NotificationClickNotifier clickNotifier,
StatusBarStateController statusBarStateController,
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
KeyguardManager keyguardManager,
IDreamManager dreamManager,
Optional<BubblesManager> bubblesManager,
Lazy<AssistManager> assistManagerLazy,
NotificationRemoteInputManager remoteInputManager,
GroupMembershipManager groupMembershipManager,
NotificationLockscreenUserManager lockscreenUserManager,
ShadeController shadeController,
KeyguardStateController keyguardStateController,
NotificationInterruptStateProvider notificationInterruptStateProvider,
LockPatternUtils lockPatternUtils,
StatusBarRemoteInputCallback remoteInputCallback,
ActivityIntentHelper activityIntentHelper,
NotifPipelineFlags notifPipelineFlags,
MetricsLogger metricsLogger,
StatusBarNotificationActivityStarterLogger logger,
OnUserInteractionCallback onUserInteractionCallback) {
mContext = context;
mCommandQueue = commandQueue;
mMainThreadHandler = mainThreadHandler;
mUiBgExecutor = uiBgExecutor;
mEntryManager = entryManager;
mNotifPipeline = notifPipeline;
mVisibilityProvider = visibilityProvider;
mHeadsUpManager = headsUpManager;
mActivityStarter = activityStarter;
mClickNotifier = clickNotifier;
mStatusBarStateController = statusBarStateController;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mKeyguardManager = keyguardManager;
mDreamManager = dreamManager;
mBubblesManagerOptional = bubblesManager;
mAssistManagerLazy = assistManagerLazy;
mRemoteInputManager = remoteInputManager;
mGroupMembershipManager = groupMembershipManager;
mLockscreenUserManager = lockscreenUserManager;
mShadeController = shadeController;
mKeyguardStateController = keyguardStateController;
mNotificationInterruptStateProvider = notificationInterruptStateProvider;
mLockPatternUtils = lockPatternUtils;
mRemoteInputCallback = remoteInputCallback;
mActivityIntentHelper = activityIntentHelper;
mNotifPipelineFlags = notifPipelineFlags;
mMetricsLogger = metricsLogger;
mLogger = logger;
mOnUserInteractionCallback = onUserInteractionCallback;
}
/** Sets the status bar to use as {@link StatusBar}. */
public Builder setStatusBar(StatusBar statusBar) {
mStatusBar = statusBar;
return this;
}
public Builder setNotificationPresenter(NotificationPresenter notificationPresenter) {
mNotificationPresenter = notificationPresenter;
return this;
}
/** Set the ActivityLaunchAnimator. */
public Builder setActivityLaunchAnimator(ActivityLaunchAnimator activityLaunchAnimator) {
mActivityLaunchAnimator = activityLaunchAnimator;
return this;
}
/** Set the NotificationLaunchAnimatorControllerProvider. */
public Builder setNotificationAnimatorControllerProvider(
NotificationLaunchAnimatorControllerProvider notificationAnimationProvider) {
mNotificationAnimationProvider = notificationAnimationProvider;
return this;
}
/** Set the NotificationPanelViewController. */
public Builder setNotificationPanelViewController(
NotificationPanelViewController notificationPanelViewController) {
mNotificationPanelViewController = notificationPanelViewController;
return this;
}
public StatusBarNotificationActivityStarter build() {
return new StatusBarNotificationActivityStarter(
mContext,
mCommandQueue,
mMainThreadHandler,
mUiBgExecutor,
mEntryManager,
mNotifPipeline,
mVisibilityProvider,
mHeadsUpManager,
mActivityStarter,
mClickNotifier,
mStatusBarStateController,
mStatusBarKeyguardViewManager,
mKeyguardManager,
mDreamManager,
mBubblesManagerOptional,
mAssistManagerLazy,
mRemoteInputManager,
mGroupMembershipManager,
mLockscreenUserManager,
mShadeController,
mKeyguardStateController,
mNotificationInterruptStateProvider,
mLockPatternUtils,
mRemoteInputCallback,
mActivityIntentHelper,
mNotifPipelineFlags,
mMetricsLogger,
mLogger,
mOnUserInteractionCallback,
mStatusBar,
mNotificationPresenter,
mNotificationPanelViewController,
mActivityLaunchAnimator,
mNotificationAnimationProvider);
}
}
}

View File

@@ -0,0 +1,29 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.statusbar.phone;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import dagger.Binds;
import dagger.Module;
@Module
public abstract class StatusBarNotificationActivityStarterModule {
@Binds
abstract NotificationActivityStarter bindActivityStarter(
StatusBarNotificationActivityStarter impl);
}

View File

@@ -68,20 +68,25 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import java.util.List;
public class StatusBarNotificationPresenter implements NotificationPresenter,
import javax.inject.Inject;
@StatusBarComponent.StatusBarScope
class StatusBarNotificationPresenter implements NotificationPresenter,
ConfigurationController.ConfigurationListener,
NotificationRowBinderImpl.BindRowCallback,
CommandQueue.Callbacks {
private static final String TAG = "StatusBarNotificationPresenter";
private final ActivityStarter mActivityStarter = Dependency.get(ActivityStarter.class);
private final ActivityStarter mActivityStarter;
private final KeyguardStateController mKeyguardStateController;
private final NotificationViewHierarchyManager mViewHierarchyManager;
private final NotificationLockscreenUserManager mLockscreenUserManager;
@@ -110,16 +115,19 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
private final NotifPipelineFlags mNotifPipelineFlags;
private final IStatusBarService mBarService;
private final DynamicPrivacyController mDynamicPrivacyController;
private final NotificationListContainer mNotifListContainer;
private boolean mReinflateNotificationsOnUserSwitched;
private boolean mDispatchUiModeChangeOnUserSwitched;
private TextView mNotificationPanelDebugText;
protected boolean mVrMode;
public StatusBarNotificationPresenter(Context context,
@Inject
StatusBarNotificationPresenter(Context context,
NotificationPanelViewController panel,
HeadsUpManagerPhone headsUp,
NotificationShadeWindowView statusBarWindow,
ActivityStarter activityStarter,
NotificationStackScrollLayoutController stackScrollerController,
DozeScrimController dozeScrimController,
ScrimController scrimController,
@@ -144,7 +152,10 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
NotificationInterruptStateProvider notificationInterruptStateProvider,
NotificationRemoteInputManager remoteInputManager,
ConfigurationController configurationController,
NotifPipelineFlags notifPipelineFlags) {
NotifPipelineFlags notifPipelineFlags,
NotificationRemoteInputManager.Callback remoteInputManagerCallback,
NotificationListContainer notificationListContainer) {
mActivityStarter = activityStarter;
mKeyguardStateController = keyguardStateController;
mNotificationPanel = panel;
mHeadsUpManager = headsUp;
@@ -175,6 +186,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
mKeyguardManager = context.getSystemService(KeyguardManager.class);
mBarService = IStatusBarService.Stub.asInterface(
ServiceManager.getService(Context.STATUS_BAR_SERVICE));
mNotifListContainer = notificationListContainer;
IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
Context.VR_SERVICE));
@@ -186,14 +198,14 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
}
}
remoteInputManager.setUpWithCallback(
Dependency.get(NotificationRemoteInputManager.Callback.class),
remoteInputManagerCallback,
mNotificationPanel.createRemoteInputDelegate());
initController.addPostInitTask(() -> {
mKeyguardIndicationController.init();
mViewHierarchyManager.setUpWithPresenter(this,
stackScrollerController.getNotifStackController(),
stackScrollerController.getNotificationListContainer());
mNotifListContainer);
mNotifShadeEventSource.setShadeEmptiedCallback(this::maybeClosePanelForShadeEmptied);
mNotifShadeEventSource.setNotifRemovedByUserCallback(this::maybeEndAmbientPulse);
if (!mNotifPipelineFlags.isNewPipelineEnabled()) {
@@ -206,9 +218,8 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
notificationInterruptStateProvider.addSuppressor(mInterruptSuppressor);
mLockscreenUserManager.setUpWithPresenter(this);
mMediaManager.setUpWithPresenter(this);
mGutsManager.setUpWithPresenter(this,
stackScrollerController.getNotificationListContainer(), mCheckSaveListener,
mOnSettingsClickListener);
mGutsManager.setUpWithPresenter(
this, mNotifListContainer, mCheckSaveListener, mOnSettingsClickListener);
// ForegroundServiceNotificationListener adds its listener in its constructor
// but we need to request it here in order for it to be instantiated.
// TODO: figure out how to do this correctly once Dependency.get() is gone.

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.statusbar.phone;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl;
import dagger.Binds;
import dagger.Module;
@Module
public abstract class StatusBarNotificationPresenterModule {
@Binds
abstract NotificationPresenter bindPresenter(StatusBarNotificationPresenter impl);
@Binds
abstract NotificationRowBinderImpl.BindRowCallback bindBindRowCallback(
StatusBarNotificationPresenter impl);
}

View File

@@ -22,16 +22,23 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import com.android.keyguard.LockIconViewController;
import com.android.systemui.biometrics.AuthRippleController;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationShelfController;
import com.android.systemui.statusbar.core.StatusBarInitializer;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl;
import com.android.systemui.statusbar.notification.collection.render.StatusBarNotifPanelEventSourceModule;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutListContainerModule;
import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController;
import com.android.systemui.statusbar.phone.SplitShadeHeaderController;
import com.android.systemui.statusbar.phone.StatusBarCommandQueueCallbacks;
import com.android.systemui.statusbar.phone.StatusBarHeadsUpChangeListener;
import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarterModule;
import com.android.systemui.statusbar.phone.StatusBarNotificationPresenterModule;
import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment;
import java.lang.annotation.Documented;
@@ -53,11 +60,15 @@ import dagger.Subcomponent;
* outside the component. Should more items be moved *into* this component to avoid so many getters?
*/
@Subcomponent(modules = {
NotificationStackScrollLayoutListContainerModule.class,
StatusBarNotifPanelEventSourceModule.class,
StatusBarViewModule.class
StatusBarViewModule.class,
StatusBarNotificationActivityStarterModule.class,
StatusBarNotificationPresenterModule.class,
})
@StatusBarComponent.StatusBarScope
public interface StatusBarComponent {
/**
* Builder for {@link StatusBarComponent}.
*/
@@ -74,60 +85,58 @@ public interface StatusBarComponent {
@Scope
@interface StatusBarScope {}
/**
* Performs initialization logic after {@link StatusBarComponent} has been constructed.
*/
interface Startable {
void start();
void stop();
}
/**
* Creates a {@link NotificationShadeWindowView}.
*/
@StatusBarScope
NotificationShadeWindowView getNotificationShadeWindowView();
/** */
@StatusBarScope
NotificationShelfController getNotificationShelfController();
/** */
@StatusBarScope
NotificationStackScrollLayoutController getNotificationStackScrollLayoutController();
/**
* Creates a NotificationShadeWindowViewController.
*/
@StatusBarScope
NotificationShadeWindowViewController getNotificationShadeWindowViewController();
/**
* Creates a NotificationPanelViewController.
*/
@StatusBarScope
NotificationPanelViewController getNotificationPanelViewController();
/**
* Creates a LockIconViewController. Must be init after creation.
*/
@StatusBarScope
LockIconViewController getLockIconViewController();
/**
* Creates an AuthRippleViewController. Must be init after creation.
*/
@StatusBarScope
AuthRippleController getAuthRippleController();
/**
* Creates a StatusBarHeadsUpChangeListener.
*/
@StatusBarScope
StatusBarHeadsUpChangeListener getStatusBarHeadsUpChangeListener();
/**
* Creates a StatusBarCommandQueueCallbacks.
*/
@StatusBarScope
StatusBarCommandQueueCallbacks getStatusBarCommandQueueCallbacks();
/**
* Creates a SplitShadeHeaderController.
*/
@StatusBarScope
SplitShadeHeaderController getSplitShadeHeaderController();
/**
@@ -140,20 +149,18 @@ public interface StatusBarComponent {
/**
* Creates a StatusBarInitializer
*/
@StatusBarScope
StatusBarInitializer getStatusBarInitializer();
/**
* Set of startables to be run after a StatusBarComponent has been constructed.
*/
@StatusBarScope
Set<Startable> getStartables();
/**
* Performs initialization logic after {@link StatusBarComponent} has been constructed.
*/
interface Startable {
void start();
void stop();
}
NotificationActivityStarter getNotificationActivityStarter();
NotificationPresenter getNotificationPresenter();
NotificationRowBinderImpl.BindRowCallback getBindRowCallback();
NotificationListContainer getNotificationListContainer();
}

View File

@@ -95,7 +95,6 @@ import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.phone.StatusBarHideIconsForBouncerManager;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallController;
@@ -198,8 +197,6 @@ public interface StatusBarPhoneModule {
CommandQueue commandQueue,
StatusBarComponent.Factory statusBarComponentFactory,
PluginManager pluginManager,
StatusBarNotificationActivityStarter.Builder
statusBarNotificationActivityStarterBuilder,
ShadeController shadeController,
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
ViewMediatorCallback viewMediatorCallback,
@@ -296,7 +293,6 @@ public interface StatusBarPhoneModule {
commandQueue,
statusBarComponentFactory,
pluginManager,
statusBarNotificationActivityStarterBuilder,
shadeController,
statusBarKeyguardViewManager,
viewMediatorCallback,

View File

@@ -130,6 +130,7 @@ import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.collection.legacy.NotificationGroupManagerLegacy;
import com.android.systemui.statusbar.notification.stack.AmbientState;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.notification.stack.NotificationRoundnessManager;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
@@ -358,6 +359,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
private NotificationShadeWindowController mNotificationShadeWindowController;
@Mock
private SysUiState mSysUiState;
@Mock
private NotificationListContainer mNotificationListContainer;
private Optional<SysUIUnfoldComponent> mSysUIUnfoldComponent = Optional.empty();
private SysuiStatusBarStateController mStatusBarStateController;
private NotificationPanelViewController mNotificationPanelViewController;
@@ -542,7 +545,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
mInteractionJankMonitor,
mQsFrameTranslateController,
mSysUiState,
mKeyguardUnlockAnimationController);
mKeyguardUnlockAnimationController,
mNotificationListContainer);
mNotificationPanelViewController.initDependencies(
mStatusBar,
() -> {},

View File

@@ -107,10 +107,11 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() {
mStatusBarKeyguardViewManager,
mStatusBarWindowStateController,
mLockIconViewController,
Optional.of(mLowLightClockController)
Optional.of(mLowLightClockController),
mStatusBar,
mNotificationShadeWindowController
)
mController.setupExpandedStatusBar()
mController.setService(mStatusBar, mNotificationShadeWindowController)
mInteractionEventHandlerCaptor =
ArgumentCaptor.forClass(InteractionEventHandler::class.java)

View File

@@ -115,9 +115,10 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase {
mStatusBarKeyguardViewManager,
mStatusBarWindowStateController,
mLockIconViewController,
Optional.of(mLowLightClockController));
Optional.of(mLowLightClockController),
mStatusBar,
mNotificationShadeWindowController);
mController.setupExpandedStatusBar();
mController.setService(mStatusBar, mNotificationShadeWindowController);
mController.setDragDownHelper(mDragDownHelper);
}

View File

@@ -203,7 +203,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
mJankMonitor);
mNotificationActivityStarter =
new StatusBarNotificationActivityStarter.Builder(
new StatusBarNotificationActivityStarter(
getContext(),
mock(CommandQueue.class),
mHandler,
@@ -229,18 +229,16 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
mock(LockPatternUtils.class),
mock(StatusBarRemoteInputCallback.class),
mActivityIntentHelper,
mNotifPipelineFlags,
mock(MetricsLogger.class),
mock(StatusBarNotificationActivityStarterLogger.class),
mOnUserInteractionCallback)
.setStatusBar(mStatusBar)
.setNotificationPresenter(mock(NotificationPresenter.class))
.setNotificationPanelViewController(
mock(NotificationPanelViewController.class))
.setActivityLaunchAnimator(mActivityLaunchAnimator)
.setNotificationAnimatorControllerProvider(notificationAnimationProvider)
.build();
mOnUserInteractionCallback,
mStatusBar,
mock(NotificationPresenter.class),
mock(NotificationPanelViewController.class),
mActivityLaunchAnimator,
notificationAnimationProvider
);
// set up dismissKeyguardThenExecute to synchronously invoke the OnDismissAction arg
doAnswer(mCallOnDismiss).when(mActivityStarter).dismissKeyguardThenExecute(

View File

@@ -37,6 +37,7 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.ForegroundServiceNotificationListener;
import com.android.systemui.InitController;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.KeyguardIndicationController;
@@ -101,19 +102,24 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
mock(NotificationStackScrollLayoutController.class);
when(stackScrollLayoutController.getView()).thenReturn(
mock(NotificationStackScrollLayout.class));
when(stackScrollLayoutController.getNotificationListContainer()).thenReturn(
mock(NotificationListContainer.class));
when(notificationShadeWindowView.getResources()).thenReturn(mContext.getResources());
mStatusBarNotificationPresenter = new StatusBarNotificationPresenter(mContext,
mock(NotificationPanelViewController.class), mock(HeadsUpManagerPhone.class),
notificationShadeWindowView, stackScrollLayoutController,
mock(DozeScrimController.class), mock(ScrimController.class),
mock(NotificationShadeWindowController.class), mock(DynamicPrivacyController.class),
mStatusBarNotificationPresenter = new StatusBarNotificationPresenter(
mContext,
mock(NotificationPanelViewController.class),
mock(HeadsUpManagerPhone.class),
notificationShadeWindowView,
mock(ActivityStarter.class),
stackScrollLayoutController,
mock(DozeScrimController.class),
mock(ScrimController.class),
mock(NotificationShadeWindowController.class),
mock(DynamicPrivacyController.class),
mock(KeyguardStateController.class),
mock(KeyguardIndicationController.class),
mStatusBar,
mock(ShadeControllerImpl.class), mock(LockscreenShadeTransitionController.class),
mock(ShadeControllerImpl.class),
mock(LockscreenShadeTransitionController.class),
mCommandQueue,
mock(NotificationViewHierarchyManager.class),
mock(NotificationLockscreenUserManager.class),
@@ -128,7 +134,9 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
mNotificationInterruptStateProvider,
mock(NotificationRemoteInputManager.class),
mock(ConfigurationController.class),
mock(NotifPipelineFlags.class));
mock(NotifPipelineFlags.class),
mock(NotificationRemoteInputManager.Callback.class),
mock(NotificationListContainer.class));
mInitController.executePostInitTasks();
ArgumentCaptor<NotificationInterruptSuppressor> suppressorCaptor =
ArgumentCaptor.forClass(NotificationInterruptSuppressor.class);

View File

@@ -258,8 +258,6 @@ public class StatusBarTest extends SysuiTestCase {
@Mock private ViewMediatorCallback mViewMediatorCallback;
@Mock private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
@Mock private ScreenPinningRequest mScreenPinningRequest;
@Mock private StatusBarNotificationActivityStarter.Builder
mStatusBarNotificationActivityStarterBuilder;
@Mock private PluginDependencyProvider mPluginDependencyProvider;
@Mock private KeyguardDismissUtil mKeyguardDismissUtil;
@Mock private ExtensionController mExtensionController;
@@ -336,8 +334,6 @@ public class StatusBarTest extends SysuiTestCase {
mContext.setTheme(R.style.Theme_SystemUI_LightWallpaper);
when(mStackScrollerController.getView()).thenReturn(mStackScroller);
when(mStackScrollerController.getNotificationListContainer()).thenReturn(
mNotificationListContainer);
when(mStackScroller.generateLayoutParams(any())).thenReturn(new LayoutParams(0, 0));
when(mNotificationPanelViewController.getView()).thenReturn(mNotificationPanelView);
when(mNotificationPanelView.getLayoutParams()).thenReturn(new LayoutParams(0, 0));
@@ -445,7 +441,6 @@ public class StatusBarTest extends SysuiTestCase {
mCommandQueue,
mStatusBarComponentFactory,
mPluginManager,
mStatusBarNotificationActivityStarterBuilder,
mShadeController,
mStatusBarKeyguardViewManager,
mViewMediatorCallback,