diff options
| author | 2022-10-21 18:05:57 +0000 | |
|---|---|---|
| committer | 2022-10-21 18:05:57 +0000 | |
| commit | 62f6fe3418fbf1de12a0e50fd330ca033ec53f37 (patch) | |
| tree | f66707783adf6c00021bc40e4276eb505f5b6415 | |
| parent | 51b868e5ff0ac57a70bb71fe2f49c9e8bc5a3a5c (diff) | |
| parent | 49c7078a7b5352a0ca78dad9750ff2fac50c8c2b (diff) | |
Merge "Move CentralSurface into initialize()." into tm-qpr-dev am: 49c7078a7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20246306
Change-Id: I1efb6f64a684acfa84797b34558f3610b01c0013
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
4 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt index b2cb23bd11aa..a5278c3d0ad3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt @@ -23,6 +23,7 @@ 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.CentralSurfaces /** * The master controller for all notifications-related work @@ -32,6 +33,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain */ interface NotificationsController { fun initialize( + centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt index 8e646a37a4b3..83cf0c8e8aba 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt @@ -56,7 +56,6 @@ import javax.inject.Inject */ @SysUISingleton class NotificationsControllerImpl @Inject constructor( - private val centralSurfaces: Lazy<CentralSurfaces>, private val notificationListener: NotificationListener, private val commonNotifCollection: Lazy<CommonNotifCollection>, private val notifPipeline: Lazy<NotifPipeline>, @@ -76,6 +75,7 @@ class NotificationsControllerImpl @Inject constructor( ) : NotificationsController { override fun initialize( + centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, @@ -92,8 +92,8 @@ class NotificationsControllerImpl @Inject constructor( notificationRowBinder.setNotificationClicker( clickerBuilder.build( - Optional.of( - centralSurfaces.get()), bubblesOptional, notificationActivityStarter)) + Optional.ofNullable(centralSurfaces), bubblesOptional, + notificationActivityStarter)) notificationRowBinder.setUpWithPresenter( presenter, listContainer, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt index 744166d87907..14856dafdb11 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt @@ -24,6 +24,7 @@ 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.CentralSurfaces import javax.inject.Inject /** @@ -34,6 +35,7 @@ class NotificationsControllerStub @Inject constructor( ) : NotificationsController { override fun initialize( + centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 8a2e92327a9e..f20c3ac67157 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -1426,6 +1426,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStackScrollerController.setNotificationActivityStarter(mNotificationActivityStarter); mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter); mNotificationsController.initialize( + this, mPresenter, mNotifListContainer, mStackScrollerController.getNotifStackController(), |