Merge "Move CentralSurface into initialize()." into tm-qpr-dev
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1426,6 +1426,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
||||
mStackScrollerController.setNotificationActivityStarter(mNotificationActivityStarter);
|
||||
mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter);
|
||||
mNotificationsController.initialize(
|
||||
this,
|
||||
mPresenter,
|
||||
mNotifListContainer,
|
||||
mStackScrollerController.getNotifStackController(),
|
||||
|
||||
Reference in New Issue
Block a user