Merge changes from topic "b190746471-status-bar-refactor" into sc-v2-dev

* changes:
  3/3 Remove SuperStatusBarViewFactory.
  2/3 Remove SuperStatusBarViewFactory#getNotificationShelfController
  1/3 Begin removine SuperStatusBarViewFactory.
This commit is contained in:
Dave Mankoff
2021-08-25 20:36:36 +00:00
committed by Android (Google) Code Review
11 changed files with 143 additions and 212 deletions

View File

@@ -18,6 +18,7 @@ package com.android.systemui.dagger;
import android.app.INotificationManager; import android.app.INotificationManager;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@@ -26,6 +27,7 @@ import com.android.keyguard.clock.ClockModule;
import com.android.keyguard.dagger.KeyguardBouncerComponent; import com.android.keyguard.dagger.KeyguardBouncerComponent;
import com.android.systemui.BootCompleteCache; import com.android.systemui.BootCompleteCache;
import com.android.systemui.BootCompleteCacheImpl; import com.android.systemui.BootCompleteCacheImpl;
import com.android.systemui.R;
import com.android.systemui.SystemUIFactory; import com.android.systemui.SystemUIFactory;
import com.android.systemui.appops.dagger.AppOpsModule; import com.android.systemui.appops.dagger.AppOpsModule;
import com.android.systemui.assist.AssistModule; import com.android.systemui.assist.AssistModule;
@@ -61,6 +63,7 @@ import com.android.systemui.statusbar.notification.row.dagger.NotificationRowCom
import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent;
import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.phone.StatusBarWindowView;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManager;
@@ -69,6 +72,7 @@ import com.android.systemui.statusbar.policy.dagger.SmartRepliesInflationModule;
import com.android.systemui.statusbar.policy.dagger.StatusBarPolicyModule; import com.android.systemui.statusbar.policy.dagger.StatusBarPolicyModule;
import com.android.systemui.tuner.dagger.TunerModule; import com.android.systemui.tuner.dagger.TunerModule;
import com.android.systemui.user.UserModule; import com.android.systemui.user.UserModule;
import com.android.systemui.util.InjectionInflationController;
import com.android.systemui.util.concurrency.SysUIConcurrencyModule; import com.android.systemui.util.concurrency.SysUIConcurrencyModule;
import com.android.systemui.util.dagger.UtilModule; import com.android.systemui.util.dagger.UtilModule;
import com.android.systemui.util.sensors.SensorModule; import com.android.systemui.util.sensors.SensorModule;
@@ -198,4 +202,19 @@ public abstract class SystemUIModule {
groupManager, entryManager, notifPipeline, sysUiState, featureFlags, dumpManager, groupManager, entryManager, notifPipeline, sysUiState, featureFlags, dumpManager,
sysuiMainExecutor)); sysuiMainExecutor));
} }
@Provides
@SysUISingleton
static StatusBarWindowView providesStatusBarWindowView(Context context,
InjectionInflationController injectionInflationController) {
StatusBarWindowView view =
(StatusBarWindowView) injectionInflationController.injectable(
LayoutInflater.from(context)).inflate(R.layout.super_status_bar,
/* root= */ null);
if (view == null) {
throw new IllegalStateException(
"R.layout.super_status_bar could not be properly inflated");
}
return view;
}
} }

View File

@@ -1,139 +0,0 @@
/*
* Copyright (C) 2019 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;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent;
import com.android.systemui.statusbar.phone.NotificationPanelView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.StatusBarWindowView;
import com.android.systemui.util.InjectionInflationController;
import javax.inject.Inject;
/**
* Creates a single instance of super_status_bar and super_notification_shade that can be shared
* across various system ui objects.
*/
@SysUISingleton
public class SuperStatusBarViewFactory {
private final Context mContext;
private final InjectionInflationController mInjectionInflationController;
private final NotificationShelfComponent.Builder mNotificationShelfComponentBuilder;
private NotificationShadeWindowView mNotificationShadeWindowView;
private StatusBarWindowView mStatusBarWindowView;
private NotificationShelfController mNotificationShelfController;
@Inject
public SuperStatusBarViewFactory(Context context,
InjectionInflationController injectionInflationController,
NotificationShelfComponent.Builder notificationShelfComponentBuilder) {
mContext = context;
mInjectionInflationController = injectionInflationController;
mNotificationShelfComponentBuilder = notificationShelfComponentBuilder;
}
/**
* Gets the inflated {@link NotificationShadeWindowView} from
* {@link R.layout#super_notification_shade}.
* Returns a cached instance, if it has already been inflated.
*/
public NotificationShadeWindowView getNotificationShadeWindowView() {
if (mNotificationShadeWindowView != null) {
return mNotificationShadeWindowView;
}
mNotificationShadeWindowView = (NotificationShadeWindowView)
mInjectionInflationController.injectable(
LayoutInflater.from(mContext)).inflate(R.layout.super_notification_shade,
/* root= */ null);
if (mNotificationShadeWindowView == null) {
throw new IllegalStateException(
"R.layout.super_notification_shade could not be properly inflated");
}
return mNotificationShadeWindowView;
}
/**
* Gets the inflated {@link StatusBarWindowView} from {@link R.layout#super_status_bar}.
* Returns a cached instance, if it has already been inflated.
*/
public StatusBarWindowView getStatusBarWindowView() {
if (mStatusBarWindowView != null) {
return mStatusBarWindowView;
}
mStatusBarWindowView =
(StatusBarWindowView) mInjectionInflationController.injectable(
LayoutInflater.from(mContext)).inflate(R.layout.super_status_bar,
/* root= */ null);
if (mStatusBarWindowView == null) {
throw new IllegalStateException(
"R.layout.super_status_bar could not be properly inflated");
}
return mStatusBarWindowView;
}
/**
* Gets the inflated {@link NotificationShelf} from
* {@link R.layout#status_bar_notification_shelf}.
* Returns a cached instance, if it has already been inflated.
*
* @param container the expected container to hold the {@link NotificationShelf}. The view
* isn't immediately attached, but the layout params of this view is used
* during inflation.
*/
public NotificationShelfController getNotificationShelfController(ViewGroup container) {
if (mNotificationShelfController != null) {
return mNotificationShelfController;
}
NotificationShelf view = (NotificationShelf) LayoutInflater.from(mContext)
.inflate(R.layout.status_bar_notification_shelf, container, /* attachToRoot= */
false);
if (view == null) {
throw new IllegalStateException(
"R.layout.status_bar_notification_shelf could not be properly inflated");
}
NotificationShelfComponent component = mNotificationShelfComponentBuilder
.notificationShelf(view)
.build();
mNotificationShelfController = component.getNotificationShelfController();
mNotificationShelfController.init();
return mNotificationShelfController;
}
public NotificationPanelView getNotificationPanelView() {
NotificationShadeWindowView notificationShadeWindowView = getNotificationShadeWindowView();
if (notificationShadeWindowView == null) {
return null;
}
return mNotificationShadeWindowView.findViewById(R.id.notification_panel);
}
}

View File

@@ -24,13 +24,10 @@ import android.view.View
import android.view.ViewGroup.LayoutParams.MATCH_PARENT import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.widget.FrameLayout import android.widget.FrameLayout
import com.android.systemui.R import com.android.systemui.R
import com.android.systemui.statusbar.SuperStatusBarViewFactory
import com.android.systemui.statusbar.phone.StatusBarLocationPublisher import com.android.systemui.statusbar.phone.StatusBarLocationPublisher
import com.android.systemui.statusbar.phone.StatusBarWindowController import com.android.systemui.statusbar.phone.StatusBarWindowController
import com.android.systemui.statusbar.phone.StatusBarWindowView import com.android.systemui.statusbar.phone.StatusBarWindowView
import javax.inject.Inject import javax.inject.Inject
/** /**
@@ -38,7 +35,7 @@ import javax.inject.Inject
*/ */
class SystemEventChipAnimationController @Inject constructor( class SystemEventChipAnimationController @Inject constructor(
private val context: Context, private val context: Context,
private val statusBarViewFactory: SuperStatusBarViewFactory, private val statusBarWindowView: StatusBarWindowView,
private val statusBarWindowController: StatusBarWindowController, private val statusBarWindowController: StatusBarWindowController,
private val locationPublisher: StatusBarLocationPublisher private val locationPublisher: StatusBarLocationPublisher
) : SystemStatusChipAnimationCallback { ) : SystemStatusChipAnimationCallback {
@@ -51,7 +48,6 @@ class SystemEventChipAnimationController @Inject constructor(
private lateinit var animationWindowView: FrameLayout private lateinit var animationWindowView: FrameLayout
private lateinit var animationDotView: View private lateinit var animationDotView: View
private lateinit var statusBarWindowView: StatusBarWindowView
private var currentAnimatedView: View? = null private var currentAnimatedView: View? = null
// TODO: move to dagger // TODO: move to dagger
@@ -125,7 +121,6 @@ class SystemEventChipAnimationController @Inject constructor(
private fun init() { private fun init() {
initialized = true initialized = true
statusBarWindowView = statusBarViewFactory.statusBarWindowView
animationWindowView = LayoutInflater.from(context) animationWindowView = LayoutInflater.from(context)
.inflate(R.layout.system_event_animation_window, null) as FrameLayout .inflate(R.layout.system_event_animation_window, null) as FrameLayout
animationDotView = animationWindowView.findViewById(R.id.dot_view) animationDotView = animationWindowView.findViewById(R.id.dot_view)

View File

@@ -47,7 +47,6 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.PulseExpansionHandler;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.NotificationEntryManager;
@@ -106,7 +105,7 @@ public class NotificationShadeWindowViewController {
private boolean mExpandingBelowNotch; private boolean mExpandingBelowNotch;
private final DockManager mDockManager; private final DockManager mDockManager;
private final NotificationPanelViewController mNotificationPanelViewController; private final NotificationPanelViewController mNotificationPanelViewController;
private final SuperStatusBarViewFactory mStatusBarViewFactory; private final StatusBarWindowView mStatusBarWindowView;
// Used for determining view / touch intersection // Used for determining view / touch intersection
private int[] mTempLocation = new int[2]; private int[] mTempLocation = new int[2];
@@ -136,7 +135,7 @@ public class NotificationShadeWindowViewController {
NotificationShadeDepthController depthController, NotificationShadeDepthController depthController,
NotificationShadeWindowView notificationShadeWindowView, NotificationShadeWindowView notificationShadeWindowView,
NotificationPanelViewController notificationPanelViewController, NotificationPanelViewController notificationPanelViewController,
SuperStatusBarViewFactory statusBarViewFactory, StatusBarWindowView statusBarWindowView,
NotificationStackScrollLayoutController notificationStackScrollLayoutController, NotificationStackScrollLayoutController notificationStackScrollLayoutController,
StatusBarKeyguardViewManager statusBarKeyguardViewManager) { StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
mInjectionInflationController = injectionInflationController; mInjectionInflationController = injectionInflationController;
@@ -160,7 +159,7 @@ public class NotificationShadeWindowViewController {
mDockManager = dockManager; mDockManager = dockManager;
mNotificationPanelViewController = notificationPanelViewController; mNotificationPanelViewController = notificationPanelViewController;
mDepthController = depthController; mDepthController = depthController;
mStatusBarViewFactory = statusBarViewFactory; mStatusBarWindowView = statusBarWindowView;
mNotificationStackScrollLayoutController = notificationStackScrollLayoutController; mNotificationStackScrollLayoutController = notificationStackScrollLayoutController;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager; mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
@@ -477,11 +476,10 @@ public class NotificationShadeWindowViewController {
public void setStatusBarView(PhoneStatusBarView statusBarView) { public void setStatusBarView(PhoneStatusBarView statusBarView) {
mStatusBarView = statusBarView; mStatusBarView = statusBarView;
if (statusBarView != null && mStatusBarViewFactory != null) { if (statusBarView != null) {
mBarTransitions = new PhoneStatusBarTransitions( mBarTransitions = new PhoneStatusBarTransitions(
statusBarView, statusBarView,
mStatusBarViewFactory.getStatusBarWindowView() mStatusBarWindowView.findViewById(R.id.status_bar_container));
.findViewById(R.id.status_bar_container));
} }
} }

View File

@@ -194,7 +194,6 @@ import com.android.systemui.statusbar.OperatorNameViewController;
import com.android.systemui.statusbar.PowerButtonReveal; import com.android.systemui.statusbar.PowerButtonReveal;
import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.PulseExpansionHandler;
import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler; import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
@@ -228,11 +227,11 @@ import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService;
import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation; import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.systemui.util.concurrency.DelayableExecutor; import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.MessageRouter; import com.android.systemui.util.concurrency.MessageRouter;
import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeComponent;
import com.android.systemui.wmshell.BubblesManager; import com.android.systemui.wmshell.BubblesManager;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.wm.shell.bubbles.Bubbles; import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen; import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
import com.android.wm.shell.startingsurface.SplashscreenContentDrawer; import com.android.wm.shell.startingsurface.SplashscreenContentDrawer;
@@ -248,7 +247,6 @@ import java.util.Optional;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider;
import dagger.Lazy; import dagger.Lazy;
@@ -459,7 +457,6 @@ public class StatusBar extends SystemUI implements
private final Point mCurrentDisplaySize = new Point(); private final Point mCurrentDisplaySize = new Point();
protected NotificationShadeWindowView mNotificationShadeWindowView; protected NotificationShadeWindowView mNotificationShadeWindowView;
protected StatusBarWindowView mPhoneStatusBarWindow;
protected PhoneStatusBarView mStatusBarView; protected PhoneStatusBarView mStatusBarView;
private PhoneStatusBarViewController mPhoneStatusBarViewController; private PhoneStatusBarViewController mPhoneStatusBarViewController;
private AuthRippleController mAuthRippleController; private AuthRippleController mAuthRippleController;
@@ -491,13 +488,13 @@ public class StatusBar extends SystemUI implements
protected NotificationShadeWindowViewController mNotificationShadeWindowViewController; protected NotificationShadeWindowViewController mNotificationShadeWindowViewController;
private final DozeParameters mDozeParameters; private final DozeParameters mDozeParameters;
private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy; private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy;
private final Provider<StatusBarComponent.Builder> mStatusBarComponentBuilder; private final StatusBarComponent.Factory mStatusBarComponentFactory;
private final PluginManager mPluginManager; private final PluginManager mPluginManager;
private final Optional<LegacySplitScreen> mSplitScreenOptional; private final Optional<LegacySplitScreen> mSplitScreenOptional;
private final StatusBarNotificationActivityStarter.Builder private final StatusBarNotificationActivityStarter.Builder
mStatusBarNotificationActivityStarterBuilder; mStatusBarNotificationActivityStarterBuilder;
private final ShadeController mShadeController; private final ShadeController mShadeController;
private final SuperStatusBarViewFactory mSuperStatusBarViewFactory; private final StatusBarWindowView mStatusBarWindowView;
private final LightsOutNotifController mLightsOutNotifController; private final LightsOutNotifController mLightsOutNotifController;
private final InitController mInitController; private final InitController mInitController;
@@ -744,14 +741,14 @@ public class StatusBar extends SystemUI implements
DozeScrimController dozeScrimController, DozeScrimController dozeScrimController,
VolumeComponent volumeComponent, VolumeComponent volumeComponent,
CommandQueue commandQueue, CommandQueue commandQueue,
Provider<StatusBarComponent.Builder> statusBarComponentBuilder, StatusBarComponent.Factory statusBarComponentFactory,
PluginManager pluginManager, PluginManager pluginManager,
Optional<LegacySplitScreen> splitScreenOptional, Optional<LegacySplitScreen> splitScreenOptional,
LightsOutNotifController lightsOutNotifController, LightsOutNotifController lightsOutNotifController,
StatusBarNotificationActivityStarter.Builder StatusBarNotificationActivityStarter.Builder
statusBarNotificationActivityStarterBuilder, statusBarNotificationActivityStarterBuilder,
ShadeController shadeController, ShadeController shadeController,
SuperStatusBarViewFactory superStatusBarViewFactory, StatusBarWindowView statusBarWindowView,
StatusBarKeyguardViewManager statusBarKeyguardViewManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager,
ViewMediatorCallback viewMediatorCallback, ViewMediatorCallback viewMediatorCallback,
InitController initController, InitController initController,
@@ -841,12 +838,12 @@ public class StatusBar extends SystemUI implements
mNotificationShadeDepthControllerLazy = notificationShadeDepthControllerLazy; mNotificationShadeDepthControllerLazy = notificationShadeDepthControllerLazy;
mVolumeComponent = volumeComponent; mVolumeComponent = volumeComponent;
mCommandQueue = commandQueue; mCommandQueue = commandQueue;
mStatusBarComponentBuilder = statusBarComponentBuilder; mStatusBarComponentFactory = statusBarComponentFactory;
mPluginManager = pluginManager; mPluginManager = pluginManager;
mSplitScreenOptional = splitScreenOptional; mSplitScreenOptional = splitScreenOptional;
mStatusBarNotificationActivityStarterBuilder = statusBarNotificationActivityStarterBuilder; mStatusBarNotificationActivityStarterBuilder = statusBarNotificationActivityStarterBuilder;
mShadeController = shadeController; mShadeController = shadeController;
mSuperStatusBarViewFactory = superStatusBarViewFactory; mStatusBarWindowView = statusBarWindowView;
mLightsOutNotifController = lightsOutNotifController; mLightsOutNotifController = lightsOutNotifController;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager; mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mKeyguardViewMediatorCallback = viewMediatorCallback; mKeyguardViewMediatorCallback = viewMediatorCallback;
@@ -1108,14 +1105,10 @@ public class StatusBar extends SystemUI implements
// TODO: Deal with the ugliness that comes from having some of the statusbar broken out // 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. // into fragments, but the rest here, it leaves some awkward lifecycle and whatnot.
mStackScrollerController =
mNotificationPanelViewController.getNotificationStackScrollLayoutController();
mStackScroller = mStackScrollerController.getView();
NotificationListContainer notifListContainer = NotificationListContainer notifListContainer =
mStackScrollerController.getNotificationListContainer(); mStackScrollerController.getNotificationListContainer();
mNotificationLogger.setUpWithContainer(notifListContainer); mNotificationLogger.setUpWithContainer(notifListContainer);
inflateShelf();
mNotificationIconAreaController.setupShelf(mNotificationShelfController); mNotificationIconAreaController.setupShelf(mNotificationShelfController);
mNotificationPanelViewController.addExpansionListener(mWakeUpCoordinator); mNotificationPanelViewController.addExpansionListener(mWakeUpCoordinator);
mNotificationPanelViewController.addExpansionListener( mNotificationPanelViewController.addExpansionListener(
@@ -1124,7 +1117,7 @@ public class StatusBar extends SystemUI implements
// Allow plugins to reference DarkIconDispatcher and StatusBarStateController // Allow plugins to reference DarkIconDispatcher and StatusBarStateController
mPluginDependencyProvider.allowPluginDependency(DarkIconDispatcher.class); mPluginDependencyProvider.allowPluginDependency(DarkIconDispatcher.class);
mPluginDependencyProvider.allowPluginDependency(StatusBarStateController.class); mPluginDependencyProvider.allowPluginDependency(StatusBarStateController.class);
FragmentHostManager.get(mPhoneStatusBarWindow) FragmentHostManager.get(mStatusBarWindowView)
.addTagListener(CollapsedStatusBarFragment.TAG, (tag, fragment) -> { .addTagListener(CollapsedStatusBarFragment.TAG, (tag, fragment) -> {
CollapsedStatusBarFragment statusBarFragment = CollapsedStatusBarFragment statusBarFragment =
(CollapsedStatusBarFragment) fragment; (CollapsedStatusBarFragment) fragment;
@@ -1542,24 +1535,20 @@ public class StatusBar extends SystemUI implements
}; };
} }
private void inflateShelf() {
mNotificationShelfController = mSuperStatusBarViewFactory
.getNotificationShelfController(mStackScroller);
}
private void inflateStatusBarWindow() { private void inflateStatusBarWindow() {
mNotificationShadeWindowView = mSuperStatusBarViewFactory.getNotificationShadeWindowView(); StatusBarComponent statusBarComponent = mStatusBarComponentFactory.create();
StatusBarComponent statusBarComponent = mStatusBarComponentBuilder.get() mNotificationShadeWindowView = statusBarComponent.getNotificationShadeWindowView();
.statusBarWindowView(mNotificationShadeWindowView).build();
mNotificationShadeWindowViewController = statusBarComponent mNotificationShadeWindowViewController = statusBarComponent
.getNotificationShadeWindowViewController(); .getNotificationShadeWindowViewController();
mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView);
mNotificationShadeWindowViewController.setupExpandedStatusBar(); mNotificationShadeWindowViewController.setupExpandedStatusBar();
mStatusBarWindowController = statusBarComponent.getStatusBarWindowController(); mStatusBarWindowController = statusBarComponent.getStatusBarWindowController();
mPhoneStatusBarWindow = mSuperStatusBarViewFactory.getStatusBarWindowView();
mNotificationPanelViewController = statusBarComponent.getNotificationPanelViewController(); mNotificationPanelViewController = statusBarComponent.getNotificationPanelViewController();
statusBarComponent.getLockIconViewController().init(); statusBarComponent.getLockIconViewController().init();
mStackScrollerController = statusBarComponent.getNotificationStackScrollLayoutController();
mStackScroller = mStackScrollerController.getView();
mNotificationShelfController = statusBarComponent.getNotificationShelfController();
mAuthRippleController = statusBarComponent.getAuthRippleController(); mAuthRippleController = statusBarComponent.getAuthRippleController();
mAuthRippleController.init(); mAuthRippleController.init();
@@ -1634,7 +1623,7 @@ public class StatusBar extends SystemUI implements
} }
public StatusBarWindowView getStatusBarWindow() { public StatusBarWindowView getStatusBarWindow() {
return mPhoneStatusBarWindow; return mStatusBarWindowView;
} }
public NotificationShadeWindowViewController getNotificationShadeWindowViewController() { public NotificationShadeWindowViewController getNotificationShadeWindowViewController() {
@@ -2587,7 +2576,7 @@ public class StatusBar extends SystemUI implements
private ActivityLaunchAnimator.Controller wrapAnimationController( private ActivityLaunchAnimator.Controller wrapAnimationController(
ActivityLaunchAnimator.Controller animationController, boolean dismissShade) { ActivityLaunchAnimator.Controller animationController, boolean dismissShade) {
View rootView = animationController.getLaunchContainer().getRootView(); View rootView = animationController.getLaunchContainer().getRootView();
if (rootView == mSuperStatusBarViewFactory.getStatusBarWindowView()) { if (rootView == mStatusBarWindowView) {
// We are animating a view in the status bar. We have to make sure that the status bar // We are animating a view in the status bar. We have to make sure that the status bar
// window matches the full screen during the animation and that we are expanding the // window matches the full screen during the animation and that we are expanding the
// view below the other status bar text. // view below the other status bar text.

View File

@@ -43,7 +43,6 @@ import android.view.WindowManager;
import com.android.systemui.R; import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import javax.inject.Inject; import javax.inject.Inject;
@@ -58,14 +57,13 @@ public class StatusBarWindowController {
private final Context mContext; private final Context mContext;
private final WindowManager mWindowManager; private final WindowManager mWindowManager;
private final IWindowManager mIWindowManager; private final IWindowManager mIWindowManager;
private final SuperStatusBarViewFactory mSuperStatusBarViewFactory;
private final StatusBarContentInsetsProvider mContentInsetsProvider; private final StatusBarContentInsetsProvider mContentInsetsProvider;
private final Resources mResources; private final Resources mResources;
private int mBarHeight = -1; private int mBarHeight = -1;
private final State mCurrentState = new State(); private final State mCurrentState = new State();
private ViewGroup mStatusBarView; private final ViewGroup mStatusBarView;
private ViewGroup mLaunchAnimationContainer; private final ViewGroup mLaunchAnimationContainer;
private WindowManager.LayoutParams mLp; private WindowManager.LayoutParams mLp;
private final WindowManager.LayoutParams mLpChanged; private final WindowManager.LayoutParams mLpChanged;
@@ -74,15 +72,14 @@ public class StatusBarWindowController {
Context context, Context context,
WindowManager windowManager, WindowManager windowManager,
IWindowManager iWindowManager, IWindowManager iWindowManager,
SuperStatusBarViewFactory superStatusBarViewFactory, StatusBarWindowView statusBarWindowView,
StatusBarContentInsetsProvider contentInsetsProvider, StatusBarContentInsetsProvider contentInsetsProvider,
@Main Resources resources) { @Main Resources resources) {
mContext = context; mContext = context;
mWindowManager = windowManager; mWindowManager = windowManager;
mIWindowManager = iWindowManager; mIWindowManager = iWindowManager;
mContentInsetsProvider = contentInsetsProvider; mContentInsetsProvider = contentInsetsProvider;
mSuperStatusBarViewFactory = superStatusBarViewFactory; mStatusBarView = statusBarWindowView;
mStatusBarView = mSuperStatusBarViewFactory.getStatusBarWindowView();
mLaunchAnimationContainer = mStatusBarView.findViewById( mLaunchAnimationContainer = mStatusBarView.findViewById(
R.id.status_bar_launch_animation_container); R.id.status_bar_launch_animation_container);
mLpChanged = new WindowManager.LayoutParams(); mLpChanged = new WindowManager.LayoutParams();

View File

@@ -20,6 +20,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
import com.android.keyguard.LockIconViewController; import com.android.keyguard.LockIconViewController;
import com.android.systemui.biometrics.AuthRippleController; import com.android.systemui.biometrics.AuthRippleController;
import com.android.systemui.statusbar.NotificationShelfController;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController; import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController;
@@ -34,7 +36,6 @@ import java.lang.annotation.Retention;
import javax.inject.Scope; import javax.inject.Scope;
import dagger.BindsInstance;
import dagger.Subcomponent; import dagger.Subcomponent;
/** /**
@@ -46,11 +47,9 @@ public interface StatusBarComponent {
/** /**
* Builder for {@link StatusBarComponent}. * Builder for {@link StatusBarComponent}.
*/ */
@Subcomponent.Builder @Subcomponent.Factory
interface Builder { interface Factory {
@BindsInstance Builder statusBarWindowView( StatusBarComponent create();
NotificationShadeWindowView notificationShadeWindowView);
StatusBarComponent build();
} }
/** /**
@@ -61,6 +60,21 @@ public interface StatusBarComponent {
@Scope @Scope
@interface StatusBarScope {} @interface StatusBarScope {}
/**
* Creates a {@link NotificationShadeWindowView}/
* @return
*/
@StatusBarScope
NotificationShadeWindowView getNotificationShadeWindowView();
/** */
@StatusBarScope
NotificationShelfController getNotificationShelfController();
/** */
@StatusBarScope
NotificationStackScrollLayoutController getNotificationStackScrollLayoutController();
/** /**
* Creates a NotificationShadeWindowViewController. * Creates a NotificationShadeWindowViewController.
*/ */

View File

@@ -58,7 +58,6 @@ import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager;
import com.android.systemui.statusbar.OperatorNameViewController; import com.android.systemui.statusbar.OperatorNameViewController;
import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.PulseExpansionHandler;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler; import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
@@ -92,6 +91,7 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarLocationPublisher; import com.android.systemui.statusbar.phone.StatusBarLocationPublisher;
import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter; import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager; import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.StatusBarWindowView;
import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController; import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController;
import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallController; import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallController;
import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.BatteryController;
@@ -104,11 +104,11 @@ import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService;
import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation; import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.systemui.util.concurrency.DelayableExecutor; import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.MessageRouter; import com.android.systemui.util.concurrency.MessageRouter;
import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeComponent;
import com.android.systemui.wmshell.BubblesManager; import com.android.systemui.wmshell.BubblesManager;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.wm.shell.bubbles.Bubbles; import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen; import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.startingsurface.StartingSurface;
@@ -117,7 +117,6 @@ import java.util.Optional;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import javax.inject.Named; import javax.inject.Named;
import javax.inject.Provider;
import dagger.Lazy; import dagger.Lazy;
import dagger.Module; import dagger.Module;
@@ -187,14 +186,14 @@ public interface StatusBarPhoneModule {
DozeScrimController dozeScrimController, DozeScrimController dozeScrimController,
VolumeComponent volumeComponent, VolumeComponent volumeComponent,
CommandQueue commandQueue, CommandQueue commandQueue,
Provider<StatusBarComponent.Builder> statusBarComponentBuilder, StatusBarComponent.Factory statusBarComponentFactory,
PluginManager pluginManager, PluginManager pluginManager,
Optional<LegacySplitScreen> splitScreenOptional, Optional<LegacySplitScreen> splitScreenOptional,
LightsOutNotifController lightsOutNotifController, LightsOutNotifController lightsOutNotifController,
StatusBarNotificationActivityStarter.Builder StatusBarNotificationActivityStarter.Builder
statusBarNotificationActivityStarterBuilder, statusBarNotificationActivityStarterBuilder,
ShadeController shadeController, ShadeController shadeController,
SuperStatusBarViewFactory superStatusBarViewFactory, StatusBarWindowView statusBarWindowView,
StatusBarKeyguardViewManager statusBarKeyguardViewManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager,
ViewMediatorCallback viewMediatorCallback, ViewMediatorCallback viewMediatorCallback,
InitController initController, InitController initController,
@@ -281,13 +280,13 @@ public interface StatusBarPhoneModule {
dozeScrimController, dozeScrimController,
volumeComponent, volumeComponent,
commandQueue, commandQueue,
statusBarComponentBuilder, statusBarComponentFactory,
pluginManager, pluginManager,
splitScreenOptional, splitScreenOptional,
lightsOutNotifController, lightsOutNotifController,
statusBarNotificationActivityStarterBuilder, statusBarNotificationActivityStarterBuilder,
shadeController, shadeController,
superStatusBarViewFactory, statusBarWindowView,
statusBarKeyguardViewManager, statusBarKeyguardViewManager,
viewMediatorCallback, viewMediatorCallback,
initController, initController,

View File

@@ -17,15 +17,23 @@
package com.android.systemui.statusbar.phone.dagger; package com.android.systemui.statusbar.phone.dagger;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import com.android.keyguard.LockIconView; import com.android.keyguard.LockIconView;
import com.android.systemui.R; import com.android.systemui.R;
import com.android.systemui.battery.BatteryMeterView; import com.android.systemui.battery.BatteryMeterView;
import com.android.systemui.biometrics.AuthRippleView; import com.android.systemui.biometrics.AuthRippleView;
import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.NotificationShelfController;
import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.phone.NotificationPanelView; import com.android.systemui.statusbar.phone.NotificationPanelView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.TapAgainView; import com.android.systemui.statusbar.phone.TapAgainView;
import com.android.systemui.util.InjectionInflationController;
import javax.inject.Named; import javax.inject.Named;
@@ -37,6 +45,63 @@ public abstract class StatusBarViewModule {
public static final String SPLIT_SHADE_HEADER = "split_shade_header"; public static final String SPLIT_SHADE_HEADER = "split_shade_header";
/** */
@Provides
@StatusBarComponent.StatusBarScope
public static NotificationShadeWindowView providesNotificationShadeWindowView(
InjectionInflationController injectionInflationController,
Context context) {
NotificationShadeWindowView notificationShadeWindowView = (NotificationShadeWindowView)
injectionInflationController.injectable(
LayoutInflater.from(context)).inflate(R.layout.super_notification_shade,
/* root= */ null);
if (notificationShadeWindowView == null) {
throw new IllegalStateException(
"R.layout.super_notification_shade could not be properly inflated");
}
return notificationShadeWindowView;
}
/** */
@Provides
@StatusBarComponent.StatusBarScope
public static NotificationStackScrollLayout providesNotificationStackScrollLayout(
NotificationStackScrollLayoutController notificationStackScrollLayoutController) {
return notificationStackScrollLayoutController.getView();
}
/** */
@Provides
@StatusBarComponent.StatusBarScope
public static NotificationShelf providesNotificationShelf(LayoutInflater layoutInflater,
NotificationStackScrollLayout notificationStackScrollLayout) {
NotificationShelf view = (NotificationShelf) layoutInflater.inflate(
R.layout.status_bar_notification_shelf, notificationStackScrollLayout, false);
if (view == null) {
throw new IllegalStateException(
"R.layout.status_bar_notification_shelf could not be properly inflated");
}
return view;
}
/** */
@Provides
@StatusBarComponent.StatusBarScope
public static NotificationShelfController providesStatusBarWindowView(
NotificationShelfComponent.Builder notificationShelfComponentBuilder,
NotificationShelf notificationShelf) {
NotificationShelfComponent component = notificationShelfComponentBuilder
.notificationShelf(notificationShelf)
.build();
NotificationShelfController notificationShelfController =
component.getNotificationShelfController();
notificationShelfController.init();
return notificationShelfController;
}
/** */ /** */
@Provides @Provides
@StatusBarComponent.StatusBarScope @StatusBarComponent.StatusBarScope

View File

@@ -46,7 +46,6 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.PulseExpansionHandler;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.NotificationEntryManager;
@@ -92,7 +91,7 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase {
@Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private NotificationPanelViewController mNotificationPanelViewController;
@Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout;
@Mock private NotificationShadeDepthController mNotificationShadeDepthController; @Mock private NotificationShadeDepthController mNotificationShadeDepthController;
@Mock private SuperStatusBarViewFactory mStatusBarViewFactory; @Mock private StatusBarWindowView mStatusBarWindowView;
@Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private NotificationShadeWindowController mNotificationShadeWindowController;
@Mock private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController; @Mock private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
@Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; @Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
@@ -140,7 +139,7 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase {
mNotificationShadeDepthController, mNotificationShadeDepthController,
mView, mView,
mNotificationPanelViewController, mNotificationPanelViewController,
mStatusBarViewFactory, mStatusBarWindowView,
mNotificationStackScrollLayoutController, mNotificationStackScrollLayoutController,
mStatusBarKeyguardViewManager); mStatusBarKeyguardViewManager);
mController.setupExpandedStatusBar(); mController.setupExpandedStatusBar();

View File

@@ -109,7 +109,6 @@ import com.android.systemui.statusbar.OperatorNameViewController;
import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.PulseExpansionHandler;
import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.StatusBarStateControllerImpl;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler; import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.NotificationEntryManager;
@@ -140,12 +139,12 @@ import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService;
import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation; import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.concurrency.MessageRouterImpl; import com.android.systemui.util.concurrency.MessageRouterImpl;
import com.android.systemui.util.time.FakeSystemClock; import com.android.systemui.util.time.FakeSystemClock;
import com.android.systemui.volume.VolumeComponent; import com.android.systemui.volume.VolumeComponent;
import com.android.systemui.wmshell.BubblesManager; import com.android.systemui.wmshell.BubblesManager;
import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.wm.shell.bubbles.Bubbles; import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen; import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.startingsurface.StartingSurface;
@@ -160,8 +159,6 @@ import java.io.ByteArrayOutputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.Optional; import java.util.Optional;
import javax.inject.Provider;
import dagger.Lazy; import dagger.Lazy;
@SmallTest @SmallTest
@@ -235,12 +232,11 @@ public class StatusBarTest extends SysuiTestCase {
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback; @Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
@Mock private VolumeComponent mVolumeComponent; @Mock private VolumeComponent mVolumeComponent;
@Mock private CommandQueue mCommandQueue; @Mock private CommandQueue mCommandQueue;
@Mock private Provider<StatusBarComponent.Builder> mStatusBarComponentBuilderProvider; @Mock private StatusBarComponent.Factory mStatusBarComponentFactory;
@Mock private StatusBarComponent.Builder mStatusBarComponentBuilder;
@Mock private StatusBarComponent mStatusBarComponent; @Mock private StatusBarComponent mStatusBarComponent;
@Mock private PluginManager mPluginManager; @Mock private PluginManager mPluginManager;
@Mock private LegacySplitScreen mLegacySplitScreen; @Mock private LegacySplitScreen mLegacySplitScreen;
@Mock private SuperStatusBarViewFactory mSuperStatusBarViewFactory; @Mock private StatusBarWindowView mStatusBarWindowView;
@Mock private LightsOutNotifController mLightsOutNotifController; @Mock private LightsOutNotifController mLightsOutNotifController;
@Mock private ViewMediatorCallback mViewMediatorCallback; @Mock private ViewMediatorCallback mViewMediatorCallback;
@Mock private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; @Mock private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
@@ -341,8 +337,7 @@ public class StatusBarTest extends SysuiTestCase {
when(mLockscreenWallpaperLazy.get()).thenReturn(mLockscreenWallpaper); when(mLockscreenWallpaperLazy.get()).thenReturn(mLockscreenWallpaper);
when(mBiometricUnlockControllerLazy.get()).thenReturn(mBiometricUnlockController); when(mBiometricUnlockControllerLazy.get()).thenReturn(mBiometricUnlockController);
when(mStatusBarComponentBuilderProvider.get()).thenReturn(mStatusBarComponentBuilder); when(mStatusBarComponentFactory.create()).thenReturn(mStatusBarComponent);
when(mStatusBarComponentBuilder.build()).thenReturn(mStatusBarComponent);
when(mStatusBarComponent.getNotificationShadeWindowViewController()).thenReturn( when(mStatusBarComponent.getNotificationShadeWindowViewController()).thenReturn(
mNotificationShadeWindowViewController); mNotificationShadeWindowViewController);
@@ -407,13 +402,13 @@ public class StatusBarTest extends SysuiTestCase {
mDozeScrimController, mDozeScrimController,
mVolumeComponent, mVolumeComponent,
mCommandQueue, mCommandQueue,
mStatusBarComponentBuilderProvider, mStatusBarComponentFactory,
mPluginManager, mPluginManager,
Optional.of(mLegacySplitScreen), Optional.of(mLegacySplitScreen),
mLightsOutNotifController, mLightsOutNotifController,
mStatusBarNotificationActivityStarterBuilder, mStatusBarNotificationActivityStarterBuilder,
mShadeController, mShadeController,
mSuperStatusBarViewFactory, mStatusBarWindowView,
mStatusBarKeyguardViewManager, mStatusBarKeyguardViewManager,
mViewMediatorCallback, mViewMediatorCallback,
mInitController, mInitController,