Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.systemui.bouncer.ui.binder.KeyguardBouncerViewBinder; import com.android.systemui.bouncer.ui.viewmodel.KeyguardBouncerViewModel; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; Loading @@ -72,7 +73,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.PhoneStatusBarViewController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.window.StatusBarWindowStateController; import com.android.systemui.unfold.UnfoldTransitionProgressProvider; import com.android.systemui.util.time.SystemClock; Loading @@ -87,7 +87,7 @@ import javax.inject.Provider; /** * Controller for {@link NotificationShadeWindowView}. */ @CentralSurfacesComponent.CentralSurfacesScope @SysUISingleton public class NotificationShadeWindowViewController { private static final String TAG = "NotifShadeWindowVC"; private final FalsingCollector mFalsingCollector; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +36 −37 Original line number Diff line number Diff line Loading @@ -413,7 +413,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private final Point mCurrentDisplaySize = new Point(); protected NotificationShadeWindowView mNotificationShadeWindowView; protected PhoneStatusBarView mStatusBarView; private PhoneStatusBarViewController mPhoneStatusBarViewController; private PhoneStatusBarTransitions mStatusBarTransitions; Loading Loading @@ -456,7 +455,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private final FalsingManager mFalsingManager; private final BroadcastDispatcher mBroadcastDispatcher; private final ConfigurationController mConfigurationController; protected NotificationShadeWindowViewController mNotificationShadeWindowViewController; private final Lazy<NotificationShadeWindowViewController> mNotificationShadeWindowViewControllerLazy; private final DozeParameters mDozeParameters; private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy; private final CentralSurfacesComponent.Factory mCentralSurfacesComponentFactory; Loading Loading @@ -722,6 +722,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { Lazy<AssistManager> assistManagerLazy, ConfigurationController configurationController, NotificationShadeWindowController notificationShadeWindowController, Lazy<NotificationShadeWindowViewController> notificationShadeWindowViewControllerLazy, NotificationShelfController notificationShelfController, NotificationStackScrollLayoutController notificationStackScrollLayoutController, DozeParameters dozeParameters, Loading Loading @@ -825,6 +826,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAssistManagerLazy = assistManagerLazy; mConfigurationController = configurationController; mNotificationShadeWindowController = notificationShadeWindowController; mNotificationShadeWindowViewControllerLazy = notificationShadeWindowViewControllerLazy; mNotificationShelfController = notificationShelfController; mStackScrollerController = notificationStackScrollLayoutController; mStackScroller = mStackScrollerController.getView(); Loading Loading @@ -1073,7 +1075,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mDozeServiceHost.initialize( this, mStatusBarKeyguardViewManager, mNotificationShadeWindowViewController, getNotificationShadeWindowViewController(), mShadeSurface, mAmbientIndicationContainer); updateLightRevealScrimVisibility(); Loading Loading @@ -1235,8 +1237,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateTheme(); inflateStatusBarWindow(); mNotificationShadeWindowView.setOnTouchListener(getStatusBarWindowTouchListener()); mWallpaperController.setRootView(mNotificationShadeWindowView); getNotificationShadeWindowView().setOnTouchListener(getStatusBarWindowTouchListener()); mWallpaperController.setRootView(getNotificationShadeWindowView()); // TODO: Deal with the ugliness that comes from having some of the status bar broken out // into fragments, but the rest here, it leaves some awkward lifecycle and whatnot. Loading @@ -1257,7 +1259,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStatusBarView = statusBarView; mPhoneStatusBarViewController = statusBarViewController; mStatusBarTransitions = statusBarTransitions; mNotificationShadeWindowViewController getNotificationShadeWindowViewController() .setStatusBarViewController(mPhoneStatusBarViewController); // Ensure we re-propagate panel expansion values to the panel controller and // any listeners it may have, such as PanelBar. This will also ensure we Loading @@ -1271,7 +1273,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStatusBarInitializer.initializeStatusBar( mCentralSurfacesComponent::createCollapsedStatusBarFragment); mStatusBarTouchableRegionManager.setup(this, mNotificationShadeWindowView); mStatusBarTouchableRegionManager.setup(this, getNotificationShadeWindowView()); createNavigationBar(result); Loading @@ -1279,7 +1281,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mLockscreenWallpaper = mLockscreenWallpaperLazy.get(); } mAmbientIndicationContainer = mNotificationShadeWindowView.findViewById( mAmbientIndicationContainer = getNotificationShadeWindowView().findViewById( R.id.ambient_indication_container); mAutoHideController.setStatusBar(new AutoHideUiElement() { Loading @@ -1304,10 +1306,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } }); ScrimView scrimBehind = mNotificationShadeWindowView.findViewById(R.id.scrim_behind); ScrimView notificationsScrim = mNotificationShadeWindowView ScrimView scrimBehind = getNotificationShadeWindowView().findViewById(R.id.scrim_behind); ScrimView notificationsScrim = getNotificationShadeWindowView() .findViewById(R.id.scrim_notifications); ScrimView scrimInFront = mNotificationShadeWindowView.findViewById(R.id.scrim_in_front); ScrimView scrimInFront = getNotificationShadeWindowView().findViewById(R.id.scrim_in_front); mScrimController.setScrimVisibleListener(scrimsVisible -> { mNotificationShadeWindowController.setScrimsVisibility(scrimsVisible); Loading Loading @@ -1345,7 +1347,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotificationShelfController, mHeadsUpManager); BackDropView backdrop = mNotificationShadeWindowView.findViewById(R.id.backdrop); BackDropView backdrop = getNotificationShadeWindowView().findViewById(R.id.backdrop); if (mWallpaperManager.isLockscreenLiveWallpaperEnabled()) { mMediaManager.setup(null, null, null, mScrimController, null); } else { Loading @@ -1364,7 +1366,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { }); // Set up the quick settings tile panel final View container = mNotificationShadeWindowView.findViewById(R.id.qs_frame); final View container = getNotificationShadeWindowView().findViewById(R.id.qs_frame); if (container != null) { FragmentHostManager fragmentHostManager = mFragmentService.getFragmentHostManager(container); Loading @@ -1379,7 +1381,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { .withDefault(this::createDefaultQSFragment) .build()); mBrightnessMirrorController = new BrightnessMirrorController( mNotificationShadeWindowView, getNotificationShadeWindowView(), mShadeSurface, mNotificationShadeDepthControllerLazy.get(), mBrightnessSliderFactory, Loading @@ -1396,7 +1398,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { }); } mReportRejectedTouch = mNotificationShadeWindowView mReportRejectedTouch = getNotificationShadeWindowView() .findViewById(R.id.report_rejected_touch); if (mReportRejectedTouch != null) { updateReportRejectedTouchVisibility(); Loading Loading @@ -1544,7 +1546,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { protected QS createDefaultQSFragment() { return mFragmentService .getFragmentHostManager(mNotificationShadeWindowView) .getFragmentHostManager(getNotificationShadeWindowView()) .create(QSFragment.class); } Loading @@ -1553,7 +1555,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mActivityLaunchAnimator.setCallback(mActivityLaunchAnimatorCallback); mActivityLaunchAnimator.addListener(mActivityLaunchAnimatorListener); mNotificationAnimationProvider = new NotificationLaunchAnimatorControllerProvider( mNotificationShadeWindowViewController, getNotificationShadeWindowViewController(), mNotifListContainer, mHeadsUpManager, mJankMonitor); Loading Loading @@ -1592,7 +1594,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAutoHideController.checkUserAutoHide(event); mRemoteInputManager.checkRemoteInputOutside(event); mShadeController.onStatusBarTouch(event); return mNotificationShadeWindowView.onTouchEvent(event); return getNotificationShadeWindowView().onTouchEvent(event); }; } Loading @@ -1606,15 +1608,12 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mCentralSurfacesComponent::createCollapsedStatusBarFragment); ViewGroup windowRootView = mCentralSurfacesComponent.getWindowRootView(); mNotificationShadeWindowView = mCentralSurfacesComponent.getNotificationShadeWindowView(); mNotificationShadeWindowViewController = mCentralSurfacesComponent .getNotificationShadeWindowViewController(); // TODO(b/277762009): Inject [NotificationShadeWindowView] directly into the controller. // (Right now, there's a circular dependency.) mNotificationShadeWindowController.setWindowRootView(windowRootView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); getNotificationShadeWindowViewController().setupExpandedStatusBar(); mShadeController.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); getNotificationShadeWindowViewController()); mBackActionInteractor.setup(mQsController, mShadeSurface); mPresenter = mCentralSurfacesComponent.getNotificationPresenter(); mNotificationActivityStarter = mCentralSurfacesComponent.getNotificationActivityStarter(); Loading @@ -1633,6 +1632,14 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mCommandQueue.addCallback(mCommandQueueCallbacks); } protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() { return mNotificationShadeWindowViewControllerLazy.get(); } protected NotificationShadeWindowView getNotificationShadeWindowView() { return getNotificationShadeWindowViewController().getView(); } protected void startKeyguard() { Trace.beginSection("CentralSurfaces#startKeyguard"); mStatusBarStateController.addCallback(mStateListener, Loading Loading @@ -1688,7 +1695,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public AuthKeyguardMessageArea getKeyguardMessageArea() { return mNotificationShadeWindowViewController.getKeyguardMessageArea(); return getNotificationShadeWindowViewController().getKeyguardMessageArea(); } @Override Loading Loading @@ -1982,11 +1989,9 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { pw.print(" mWallpaperSupported= "); pw.println(mWallpaperSupported); pw.println(" ShadeWindowView: "); if (mNotificationShadeWindowViewController != null) { mNotificationShadeWindowViewController.dump(pw, args); getNotificationShadeWindowViewController().dump(pw, args); CentralSurfaces.dumpBarTransitions( pw, "PhoneStatusBarTransitions", mStatusBarTransitions); } pw.println(" mMediaManager: "); if (mMediaManager != null) { Loading Loading @@ -2860,7 +2865,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateVisibleToUser(); updateNotificationPanelTouchState(); mNotificationShadeWindowViewController.cancelCurrentTouch(); getNotificationShadeWindowViewController().cancelCurrentTouch(); if (mLaunchCameraOnFinishedGoingToSleep) { mLaunchCameraOnFinishedGoingToSleep = false; Loading Loading @@ -3172,12 +3177,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateScrimController(); } @VisibleForTesting public void setNotificationShadeWindowViewController( NotificationShadeWindowViewController nswvc) { mNotificationShadeWindowViewController = nswvc; } /** * Set the amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full Loading Loading @@ -3412,7 +3411,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mVisible = visible; if (visible) { DejankUtils.notifyRendererOfExpensiveFrame( mNotificationShadeWindowView, "onShadeVisibilityChanged"); getNotificationShadeWindowView(), "onShadeVisibilityChanged"); } else { mGutsManager.closeAndSaveGuts(true /* removeLeavebehind */, true /* force */, true /* removeControls */, -1 /* x */, -1 /* y */, true /* resetMenu */); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +0 −12 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import static com.android.systemui.statusbar.phone.dagger.StatusBarViewModule.ST import static java.lang.annotation.RetentionPolicy.RUNTIME; import com.android.systemui.scene.ui.view.WindowRootView; import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.ShadeHeaderController; import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.notification.NotificationActivityStarter; Loading Loading @@ -76,16 +74,6 @@ public interface CentralSurfacesComponent { /** Creates the root view of the main SysUI window}. */ WindowRootView getWindowRootView(); /** * Creates or returns a {@link NotificationShadeWindowView}. */ NotificationShadeWindowView getNotificationShadeWindowView(); /** * Creates a NotificationShadeWindowViewController. */ NotificationShadeWindowViewController getNotificationShadeWindowViewController(); /** * Creates a StatusBarHeadsUpChangeListener. */ Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +7 −13 Original line number Diff line number Diff line Loading @@ -129,7 +129,6 @@ import com.android.systemui.settings.brightness.BrightnessSliderController; import com.android.systemui.shade.CameraLauncher; import com.android.systemui.shade.NotificationPanelView; import com.android.systemui.shade.NotificationPanelViewController; import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; Loading Loading @@ -252,7 +251,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationLogger.ExpansionStateLogger mExpansionStateLogger; @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private StatusBarSignalPolicy mStatusBarSignalPolicy; @Mock private NotificationShadeWindowView mNotificationShadeWindowView; @Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private AssistManager mAssistManager; @Mock private NotificationGutsManager mNotificationGutsManager; Loading @@ -276,6 +274,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private NotificationIconAreaController mNotificationIconAreaController; @Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController; @Mock private Lazy<NotificationShadeWindowViewController> mNotificationShadeWindowViewControllerLazy; @Mock private NotificationShelfController mNotificationShelfController; @Mock private DozeParameters mDozeParameters; @Mock private Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy; Loading Loading @@ -428,10 +428,10 @@ public class CentralSurfacesImplTest extends SysuiTestCase { when(mLockscreenWallpaperLazy.get()).thenReturn(mLockscreenWallpaper); when(mBiometricUnlockControllerLazy.get()).thenReturn(mBiometricUnlockController); when(mCameraLauncherLazy.get()).thenReturn(mCameraLauncher); when(mNotificationShadeWindowViewControllerLazy.get()) .thenReturn(mNotificationShadeWindowViewController); when(mStatusBarComponentFactory.create()).thenReturn(mCentralSurfacesComponent); when(mCentralSurfacesComponent.getNotificationShadeWindowViewController()).thenReturn( mNotificationShadeWindowViewController); doAnswer(invocation -> { ((Runnable) invocation.getArgument(0)).run(); return null; Loading Loading @@ -510,6 +510,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { () -> mAssistManager, configurationController, mNotificationShadeWindowController, mNotificationShadeWindowViewControllerLazy, mNotificationShelfController, mStackScrollerController, mDozeParameters, Loading Loading @@ -586,9 +587,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { when(mKeyguardViewMediator.getViewMediatorCallback()).thenReturn( mKeyguardVieMediatorCallback); // TODO: we should be able to call mCentralSurfaces.start() and have all the below values // initialized automatically and make NPVC private. mCentralSurfaces.mNotificationShadeWindowView = mNotificationShadeWindowView; // TODO(b/277764509): we should be able to call mCentralSurfaces.start() and have all the // below values initialized automatically. mCentralSurfaces.mDozeScrimController = mDozeScrimController; mCentralSurfaces.mPresenter = mNotificationPresenter; mCentralSurfaces.mKeyguardIndicationController = mKeyguardIndicationController; Loading Loading @@ -823,8 +823,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackCallback_invocationCollapsesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading @@ -841,8 +839,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackAnimation_progressMaxScalesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading @@ -864,8 +860,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackAnimation_progressMinScalesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.systemui.bouncer.ui.binder.KeyguardBouncerViewBinder; import com.android.systemui.bouncer.ui.viewmodel.KeyguardBouncerViewModel; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; Loading @@ -72,7 +73,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.PhoneStatusBarViewController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.window.StatusBarWindowStateController; import com.android.systemui.unfold.UnfoldTransitionProgressProvider; import com.android.systemui.util.time.SystemClock; Loading @@ -87,7 +87,7 @@ import javax.inject.Provider; /** * Controller for {@link NotificationShadeWindowView}. */ @CentralSurfacesComponent.CentralSurfacesScope @SysUISingleton public class NotificationShadeWindowViewController { private static final String TAG = "NotifShadeWindowVC"; private final FalsingCollector mFalsingCollector; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +36 −37 Original line number Diff line number Diff line Loading @@ -413,7 +413,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private final Point mCurrentDisplaySize = new Point(); protected NotificationShadeWindowView mNotificationShadeWindowView; protected PhoneStatusBarView mStatusBarView; private PhoneStatusBarViewController mPhoneStatusBarViewController; private PhoneStatusBarTransitions mStatusBarTransitions; Loading Loading @@ -456,7 +455,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private final FalsingManager mFalsingManager; private final BroadcastDispatcher mBroadcastDispatcher; private final ConfigurationController mConfigurationController; protected NotificationShadeWindowViewController mNotificationShadeWindowViewController; private final Lazy<NotificationShadeWindowViewController> mNotificationShadeWindowViewControllerLazy; private final DozeParameters mDozeParameters; private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy; private final CentralSurfacesComponent.Factory mCentralSurfacesComponentFactory; Loading Loading @@ -722,6 +722,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { Lazy<AssistManager> assistManagerLazy, ConfigurationController configurationController, NotificationShadeWindowController notificationShadeWindowController, Lazy<NotificationShadeWindowViewController> notificationShadeWindowViewControllerLazy, NotificationShelfController notificationShelfController, NotificationStackScrollLayoutController notificationStackScrollLayoutController, DozeParameters dozeParameters, Loading Loading @@ -825,6 +826,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAssistManagerLazy = assistManagerLazy; mConfigurationController = configurationController; mNotificationShadeWindowController = notificationShadeWindowController; mNotificationShadeWindowViewControllerLazy = notificationShadeWindowViewControllerLazy; mNotificationShelfController = notificationShelfController; mStackScrollerController = notificationStackScrollLayoutController; mStackScroller = mStackScrollerController.getView(); Loading Loading @@ -1073,7 +1075,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mDozeServiceHost.initialize( this, mStatusBarKeyguardViewManager, mNotificationShadeWindowViewController, getNotificationShadeWindowViewController(), mShadeSurface, mAmbientIndicationContainer); updateLightRevealScrimVisibility(); Loading Loading @@ -1235,8 +1237,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateTheme(); inflateStatusBarWindow(); mNotificationShadeWindowView.setOnTouchListener(getStatusBarWindowTouchListener()); mWallpaperController.setRootView(mNotificationShadeWindowView); getNotificationShadeWindowView().setOnTouchListener(getStatusBarWindowTouchListener()); mWallpaperController.setRootView(getNotificationShadeWindowView()); // TODO: Deal with the ugliness that comes from having some of the status bar broken out // into fragments, but the rest here, it leaves some awkward lifecycle and whatnot. Loading @@ -1257,7 +1259,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStatusBarView = statusBarView; mPhoneStatusBarViewController = statusBarViewController; mStatusBarTransitions = statusBarTransitions; mNotificationShadeWindowViewController getNotificationShadeWindowViewController() .setStatusBarViewController(mPhoneStatusBarViewController); // Ensure we re-propagate panel expansion values to the panel controller and // any listeners it may have, such as PanelBar. This will also ensure we Loading @@ -1271,7 +1273,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStatusBarInitializer.initializeStatusBar( mCentralSurfacesComponent::createCollapsedStatusBarFragment); mStatusBarTouchableRegionManager.setup(this, mNotificationShadeWindowView); mStatusBarTouchableRegionManager.setup(this, getNotificationShadeWindowView()); createNavigationBar(result); Loading @@ -1279,7 +1281,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mLockscreenWallpaper = mLockscreenWallpaperLazy.get(); } mAmbientIndicationContainer = mNotificationShadeWindowView.findViewById( mAmbientIndicationContainer = getNotificationShadeWindowView().findViewById( R.id.ambient_indication_container); mAutoHideController.setStatusBar(new AutoHideUiElement() { Loading @@ -1304,10 +1306,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } }); ScrimView scrimBehind = mNotificationShadeWindowView.findViewById(R.id.scrim_behind); ScrimView notificationsScrim = mNotificationShadeWindowView ScrimView scrimBehind = getNotificationShadeWindowView().findViewById(R.id.scrim_behind); ScrimView notificationsScrim = getNotificationShadeWindowView() .findViewById(R.id.scrim_notifications); ScrimView scrimInFront = mNotificationShadeWindowView.findViewById(R.id.scrim_in_front); ScrimView scrimInFront = getNotificationShadeWindowView().findViewById(R.id.scrim_in_front); mScrimController.setScrimVisibleListener(scrimsVisible -> { mNotificationShadeWindowController.setScrimsVisibility(scrimsVisible); Loading Loading @@ -1345,7 +1347,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotificationShelfController, mHeadsUpManager); BackDropView backdrop = mNotificationShadeWindowView.findViewById(R.id.backdrop); BackDropView backdrop = getNotificationShadeWindowView().findViewById(R.id.backdrop); if (mWallpaperManager.isLockscreenLiveWallpaperEnabled()) { mMediaManager.setup(null, null, null, mScrimController, null); } else { Loading @@ -1364,7 +1366,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { }); // Set up the quick settings tile panel final View container = mNotificationShadeWindowView.findViewById(R.id.qs_frame); final View container = getNotificationShadeWindowView().findViewById(R.id.qs_frame); if (container != null) { FragmentHostManager fragmentHostManager = mFragmentService.getFragmentHostManager(container); Loading @@ -1379,7 +1381,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { .withDefault(this::createDefaultQSFragment) .build()); mBrightnessMirrorController = new BrightnessMirrorController( mNotificationShadeWindowView, getNotificationShadeWindowView(), mShadeSurface, mNotificationShadeDepthControllerLazy.get(), mBrightnessSliderFactory, Loading @@ -1396,7 +1398,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { }); } mReportRejectedTouch = mNotificationShadeWindowView mReportRejectedTouch = getNotificationShadeWindowView() .findViewById(R.id.report_rejected_touch); if (mReportRejectedTouch != null) { updateReportRejectedTouchVisibility(); Loading Loading @@ -1544,7 +1546,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { protected QS createDefaultQSFragment() { return mFragmentService .getFragmentHostManager(mNotificationShadeWindowView) .getFragmentHostManager(getNotificationShadeWindowView()) .create(QSFragment.class); } Loading @@ -1553,7 +1555,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mActivityLaunchAnimator.setCallback(mActivityLaunchAnimatorCallback); mActivityLaunchAnimator.addListener(mActivityLaunchAnimatorListener); mNotificationAnimationProvider = new NotificationLaunchAnimatorControllerProvider( mNotificationShadeWindowViewController, getNotificationShadeWindowViewController(), mNotifListContainer, mHeadsUpManager, mJankMonitor); Loading Loading @@ -1592,7 +1594,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAutoHideController.checkUserAutoHide(event); mRemoteInputManager.checkRemoteInputOutside(event); mShadeController.onStatusBarTouch(event); return mNotificationShadeWindowView.onTouchEvent(event); return getNotificationShadeWindowView().onTouchEvent(event); }; } Loading @@ -1606,15 +1608,12 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mCentralSurfacesComponent::createCollapsedStatusBarFragment); ViewGroup windowRootView = mCentralSurfacesComponent.getWindowRootView(); mNotificationShadeWindowView = mCentralSurfacesComponent.getNotificationShadeWindowView(); mNotificationShadeWindowViewController = mCentralSurfacesComponent .getNotificationShadeWindowViewController(); // TODO(b/277762009): Inject [NotificationShadeWindowView] directly into the controller. // (Right now, there's a circular dependency.) mNotificationShadeWindowController.setWindowRootView(windowRootView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); getNotificationShadeWindowViewController().setupExpandedStatusBar(); mShadeController.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); getNotificationShadeWindowViewController()); mBackActionInteractor.setup(mQsController, mShadeSurface); mPresenter = mCentralSurfacesComponent.getNotificationPresenter(); mNotificationActivityStarter = mCentralSurfacesComponent.getNotificationActivityStarter(); Loading @@ -1633,6 +1632,14 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mCommandQueue.addCallback(mCommandQueueCallbacks); } protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() { return mNotificationShadeWindowViewControllerLazy.get(); } protected NotificationShadeWindowView getNotificationShadeWindowView() { return getNotificationShadeWindowViewController().getView(); } protected void startKeyguard() { Trace.beginSection("CentralSurfaces#startKeyguard"); mStatusBarStateController.addCallback(mStateListener, Loading Loading @@ -1688,7 +1695,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public AuthKeyguardMessageArea getKeyguardMessageArea() { return mNotificationShadeWindowViewController.getKeyguardMessageArea(); return getNotificationShadeWindowViewController().getKeyguardMessageArea(); } @Override Loading Loading @@ -1982,11 +1989,9 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { pw.print(" mWallpaperSupported= "); pw.println(mWallpaperSupported); pw.println(" ShadeWindowView: "); if (mNotificationShadeWindowViewController != null) { mNotificationShadeWindowViewController.dump(pw, args); getNotificationShadeWindowViewController().dump(pw, args); CentralSurfaces.dumpBarTransitions( pw, "PhoneStatusBarTransitions", mStatusBarTransitions); } pw.println(" mMediaManager: "); if (mMediaManager != null) { Loading Loading @@ -2860,7 +2865,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateVisibleToUser(); updateNotificationPanelTouchState(); mNotificationShadeWindowViewController.cancelCurrentTouch(); getNotificationShadeWindowViewController().cancelCurrentTouch(); if (mLaunchCameraOnFinishedGoingToSleep) { mLaunchCameraOnFinishedGoingToSleep = false; Loading Loading @@ -3172,12 +3177,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { updateScrimController(); } @VisibleForTesting public void setNotificationShadeWindowViewController( NotificationShadeWindowViewController nswvc) { mNotificationShadeWindowViewController = nswvc; } /** * Set the amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full Loading Loading @@ -3412,7 +3411,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mVisible = visible; if (visible) { DejankUtils.notifyRendererOfExpensiveFrame( mNotificationShadeWindowView, "onShadeVisibilityChanged"); getNotificationShadeWindowView(), "onShadeVisibilityChanged"); } else { mGutsManager.closeAndSaveGuts(true /* removeLeavebehind */, true /* force */, true /* removeControls */, -1 /* x */, -1 /* y */, true /* resetMenu */); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +0 −12 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import static com.android.systemui.statusbar.phone.dagger.StatusBarViewModule.ST import static java.lang.annotation.RetentionPolicy.RUNTIME; import com.android.systemui.scene.ui.view.WindowRootView; import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.ShadeHeaderController; import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.notification.NotificationActivityStarter; Loading Loading @@ -76,16 +74,6 @@ public interface CentralSurfacesComponent { /** Creates the root view of the main SysUI window}. */ WindowRootView getWindowRootView(); /** * Creates or returns a {@link NotificationShadeWindowView}. */ NotificationShadeWindowView getNotificationShadeWindowView(); /** * Creates a NotificationShadeWindowViewController. */ NotificationShadeWindowViewController getNotificationShadeWindowViewController(); /** * Creates a StatusBarHeadsUpChangeListener. */ Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +7 −13 Original line number Diff line number Diff line Loading @@ -129,7 +129,6 @@ import com.android.systemui.settings.brightness.BrightnessSliderController; import com.android.systemui.shade.CameraLauncher; import com.android.systemui.shade.NotificationPanelView; import com.android.systemui.shade.NotificationPanelViewController; import com.android.systemui.shade.NotificationShadeWindowView; import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; Loading Loading @@ -252,7 +251,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationLogger.ExpansionStateLogger mExpansionStateLogger; @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private StatusBarSignalPolicy mStatusBarSignalPolicy; @Mock private NotificationShadeWindowView mNotificationShadeWindowView; @Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private AssistManager mAssistManager; @Mock private NotificationGutsManager mNotificationGutsManager; Loading @@ -276,6 +274,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private NotificationIconAreaController mNotificationIconAreaController; @Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController; @Mock private Lazy<NotificationShadeWindowViewController> mNotificationShadeWindowViewControllerLazy; @Mock private NotificationShelfController mNotificationShelfController; @Mock private DozeParameters mDozeParameters; @Mock private Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy; Loading Loading @@ -428,10 +428,10 @@ public class CentralSurfacesImplTest extends SysuiTestCase { when(mLockscreenWallpaperLazy.get()).thenReturn(mLockscreenWallpaper); when(mBiometricUnlockControllerLazy.get()).thenReturn(mBiometricUnlockController); when(mCameraLauncherLazy.get()).thenReturn(mCameraLauncher); when(mNotificationShadeWindowViewControllerLazy.get()) .thenReturn(mNotificationShadeWindowViewController); when(mStatusBarComponentFactory.create()).thenReturn(mCentralSurfacesComponent); when(mCentralSurfacesComponent.getNotificationShadeWindowViewController()).thenReturn( mNotificationShadeWindowViewController); doAnswer(invocation -> { ((Runnable) invocation.getArgument(0)).run(); return null; Loading Loading @@ -510,6 +510,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { () -> mAssistManager, configurationController, mNotificationShadeWindowController, mNotificationShadeWindowViewControllerLazy, mNotificationShelfController, mStackScrollerController, mDozeParameters, Loading Loading @@ -586,9 +587,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { when(mKeyguardViewMediator.getViewMediatorCallback()).thenReturn( mKeyguardVieMediatorCallback); // TODO: we should be able to call mCentralSurfaces.start() and have all the below values // initialized automatically and make NPVC private. mCentralSurfaces.mNotificationShadeWindowView = mNotificationShadeWindowView; // TODO(b/277764509): we should be able to call mCentralSurfaces.start() and have all the // below values initialized automatically. mCentralSurfaces.mDozeScrimController = mDozeScrimController; mCentralSurfaces.mPresenter = mNotificationPresenter; mCentralSurfaces.mKeyguardIndicationController = mKeyguardIndicationController; Loading Loading @@ -823,8 +823,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackCallback_invocationCollapsesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading @@ -841,8 +839,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackAnimation_progressMaxScalesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading @@ -864,8 +860,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { */ @Test public void testPredictiveBackAnimation_progressMinScalesPanel() { mCentralSurfaces.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mCentralSurfaces.handleVisibleToUserChanged(true); verify(mOnBackInvokedDispatcher).registerOnBackInvokedCallback( eq(OnBackInvokedDispatcher.PRIORITY_DEFAULT), Loading