Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +9 −11 Original line number Diff line number Diff line Loading @@ -17,15 +17,14 @@ package com.android.systemui.statusbar.notification; import android.app.Notification; import android.os.PowerManager; import android.os.SystemClock; import android.service.notification.StatusBarNotification; import android.util.Log; import android.view.View; import com.android.systemui.DejankUtils; import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.wm.shell.bubbles.Bubbles; import java.util.Optional; Loading @@ -40,7 +39,7 @@ public final class NotificationClicker implements View.OnClickListener { private static final String TAG = "NotificationClicker"; private final NotificationClickerLogger mLogger; private final Optional<CentralSurfaces> mCentralSurfacesOptional; private final PowerInteractor mPowerInteractor; private final Optional<Bubbles> mBubblesOptional; private final NotificationActivityStarter mNotificationActivityStarter; Loading @@ -54,11 +53,11 @@ public final class NotificationClicker implements View.OnClickListener { private NotificationClicker( NotificationClickerLogger logger, Optional<CentralSurfaces> centralSurfacesOptional, PowerInteractor powerInteractor, Optional<Bubbles> bubblesOptional, NotificationActivityStarter notificationActivityStarter) { mLogger = logger; mCentralSurfacesOptional = centralSurfacesOptional; mPowerInteractor = powerInteractor; mBubblesOptional = bubblesOptional; mNotificationActivityStarter = notificationActivityStarter; } Loading @@ -70,9 +69,7 @@ public final class NotificationClicker implements View.OnClickListener { return; } mCentralSurfacesOptional.ifPresent(centralSurfaces -> centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), "NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE)); mPowerInteractor.wakeUpIfDozing("NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE); final ExpandableNotificationRow row = (ExpandableNotificationRow) v; final NotificationEntry entry = row.getEntry(); Loading Loading @@ -131,21 +128,22 @@ public final class NotificationClicker implements View.OnClickListener { /** Daggerized builder for NotificationClicker. */ public static class Builder { private final NotificationClickerLogger mLogger; private final PowerInteractor mPowerInteractor; @Inject public Builder(NotificationClickerLogger logger) { public Builder(NotificationClickerLogger logger, PowerInteractor powerInteractor) { mLogger = logger; mPowerInteractor = powerInteractor; } /** Builds an instance. */ public NotificationClicker build( Optional<CentralSurfaces> centralSurfacesOptional, Optional<Bubbles> bubblesOptional, NotificationActivityStarter notificationActivityStarter ) { return new NotificationClicker( mLogger, centralSurfacesOptional, mPowerInteractor, bubblesOptional, notificationActivityStarter); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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 Loading @@ -32,7 +31,6 @@ import com.android.systemui.statusbar.phone.CentralSurfaces */ interface NotificationsController { fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +1 −5 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.systemui.statusbar.notification.logging.NotificationLogger import com.android.systemui.statusbar.notification.logging.NotificationMemoryMonitor import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.wm.shell.bubbles.Bubbles import dagger.Lazy import java.util.Optional Loading Loading @@ -78,7 +77,6 @@ class NotificationsControllerImpl @Inject constructor( ) : NotificationsController { override fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading @@ -93,9 +91,7 @@ class NotificationsControllerImpl @Inject constructor( }) notificationRowBinder.setNotificationClicker( clickerBuilder.build( Optional.ofNullable(centralSurfaces), bubblesOptional, notificationActivityStarter)) clickerBuilder.build(bubblesOptional, notificationActivityStarter)) notificationRowBinder.setUpWithPresenter(presenter, listContainer) headsUpViewBinder.setPresenter(presenter) notifBindPipelineInitializer.initialize() Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt +0 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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 /** Loading @@ -34,7 +33,6 @@ class NotificationsControllerStub @Inject constructor( ) : NotificationsController { override fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1582,7 +1582,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter); mShadeController.setNotificationPresenter(mPresenter); mNotificationsController.initialize( this, mPresenter, mNotifListContainer, mStackScrollerController.getNotifStackController(), Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +9 −11 Original line number Diff line number Diff line Loading @@ -17,15 +17,14 @@ package com.android.systemui.statusbar.notification; import android.app.Notification; import android.os.PowerManager; import android.os.SystemClock; import android.service.notification.StatusBarNotification; import android.util.Log; import android.view.View; import com.android.systemui.DejankUtils; import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.wm.shell.bubbles.Bubbles; import java.util.Optional; Loading @@ -40,7 +39,7 @@ public final class NotificationClicker implements View.OnClickListener { private static final String TAG = "NotificationClicker"; private final NotificationClickerLogger mLogger; private final Optional<CentralSurfaces> mCentralSurfacesOptional; private final PowerInteractor mPowerInteractor; private final Optional<Bubbles> mBubblesOptional; private final NotificationActivityStarter mNotificationActivityStarter; Loading @@ -54,11 +53,11 @@ public final class NotificationClicker implements View.OnClickListener { private NotificationClicker( NotificationClickerLogger logger, Optional<CentralSurfaces> centralSurfacesOptional, PowerInteractor powerInteractor, Optional<Bubbles> bubblesOptional, NotificationActivityStarter notificationActivityStarter) { mLogger = logger; mCentralSurfacesOptional = centralSurfacesOptional; mPowerInteractor = powerInteractor; mBubblesOptional = bubblesOptional; mNotificationActivityStarter = notificationActivityStarter; } Loading @@ -70,9 +69,7 @@ public final class NotificationClicker implements View.OnClickListener { return; } mCentralSurfacesOptional.ifPresent(centralSurfaces -> centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), "NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE)); mPowerInteractor.wakeUpIfDozing("NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE); final ExpandableNotificationRow row = (ExpandableNotificationRow) v; final NotificationEntry entry = row.getEntry(); Loading Loading @@ -131,21 +128,22 @@ public final class NotificationClicker implements View.OnClickListener { /** Daggerized builder for NotificationClicker. */ public static class Builder { private final NotificationClickerLogger mLogger; private final PowerInteractor mPowerInteractor; @Inject public Builder(NotificationClickerLogger logger) { public Builder(NotificationClickerLogger logger, PowerInteractor powerInteractor) { mLogger = logger; mPowerInteractor = powerInteractor; } /** Builds an instance. */ public NotificationClicker build( Optional<CentralSurfaces> centralSurfacesOptional, Optional<Bubbles> bubblesOptional, NotificationActivityStarter notificationActivityStarter ) { return new NotificationClicker( mLogger, centralSurfacesOptional, mPowerInteractor, bubblesOptional, notificationActivityStarter); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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 Loading @@ -32,7 +31,6 @@ import com.android.systemui.statusbar.phone.CentralSurfaces */ interface NotificationsController { fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +1 −5 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ import com.android.systemui.statusbar.notification.logging.NotificationLogger import com.android.systemui.statusbar.notification.logging.NotificationMemoryMonitor import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.wm.shell.bubbles.Bubbles import dagger.Lazy import java.util.Optional Loading Loading @@ -78,7 +77,6 @@ class NotificationsControllerImpl @Inject constructor( ) : NotificationsController { override fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading @@ -93,9 +91,7 @@ class NotificationsControllerImpl @Inject constructor( }) notificationRowBinder.setNotificationClicker( clickerBuilder.build( Optional.ofNullable(centralSurfaces), bubblesOptional, notificationActivityStarter)) clickerBuilder.build(bubblesOptional, notificationActivityStarter)) notificationRowBinder.setUpWithPresenter(presenter, listContainer) headsUpViewBinder.setPresenter(presenter) notifBindPipelineInitializer.initialize() Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt +0 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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 /** Loading @@ -34,7 +33,6 @@ class NotificationsControllerStub @Inject constructor( ) : NotificationsController { override fun initialize( centralSurfaces: CentralSurfaces, presenter: NotificationPresenter, listContainer: NotificationListContainer, stackController: NotifStackController, Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1582,7 +1582,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter); mShadeController.setNotificationPresenter(mPresenter); mNotificationsController.initialize( this, mPresenter, mNotifListContainer, mStackScrollerController.getNotifStackController(), Loading