Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,11 @@ public interface NotificationPresenter extends ExpandableNotificationRow.OnExpan */ */ void onUserSwitched(int newUserId); void onUserSwitched(int newUserId); /** * Called when a new row is created and bound to a notification. */ void onBindRow(ExpandableNotificationRow row); /** /** * @return true iff the device is in vr mode * @return true iff the device is in vr mode */ */ Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +2 −13 Original line number Original line Diff line number Diff line Loading @@ -71,7 +71,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { private NotificationPresenter mPresenter; private NotificationPresenter mPresenter; private NotificationListContainer mListContainer; private NotificationListContainer mListContainer; private BindRowCallback mBindRowCallback; private NotificationClicker mNotificationClicker; private NotificationClicker mNotificationClicker; private FeatureFlags mFeatureFlags; private FeatureFlags mFeatureFlags; Loading Loading @@ -103,11 +102,9 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { * Sets up late-bound dependencies for this component. * Sets up late-bound dependencies for this component. */ */ public void setUpWithPresenter(NotificationPresenter presenter, public void setUpWithPresenter(NotificationPresenter presenter, NotificationListContainer listContainer, NotificationListContainer listContainer) { BindRowCallback bindRowCallback) { mPresenter = presenter; mPresenter = presenter; mListContainer = listContainer; mListContainer = listContainer; mBindRowCallback = bindRowCallback; mIconManager.attach(); mIconManager.attach(); } } Loading Loading @@ -179,7 +176,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { mNotificationRemoteInputManager.bindRow(row); mNotificationRemoteInputManager.bindRow(row); entry.setRow(row); entry.setRow(row); mNotifBindPipeline.manageRow(entry, row); mNotifBindPipeline.manageRow(entry, row); mBindRowCallback.onBindRow(row); mPresenter.onBindRow(row); row.setInlineReplyAnimationFlagEnabled( row.setInlineReplyAnimationFlagEnabled( mFeatureFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION)); mFeatureFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION)); } } Loading Loading @@ -235,12 +232,4 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { } } }); }); } } /** Callback for when a row is bound to an entry. */ public interface BindRowCallback { /** * Called when a new row is created and bound to a notification. */ void onBindRow(ExpandableNotificationRow row); } } } packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt +0 −2 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.service.notification.StatusBarNotification import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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.collection.render.NotifStackController import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfaces Loading @@ -38,7 +37,6 @@ interface NotificationsController { listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) ) fun resetUserExpandedStates() fun resetUserExpandedStates() Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +1 −5 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,6 @@ class NotificationsControllerImpl @Inject constructor( listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) { ) { notificationListener.registerAsSystemService() notificationListener.registerAsSystemService() Loading @@ -97,10 +96,7 @@ class NotificationsControllerImpl @Inject constructor( clickerBuilder.build( clickerBuilder.build( Optional.ofNullable(centralSurfaces), bubblesOptional, Optional.ofNullable(centralSurfaces), bubblesOptional, notificationActivityStarter)) notificationActivityStarter)) notificationRowBinder.setUpWithPresenter( notificationRowBinder.setUpWithPresenter(presenter, listContainer) presenter, listContainer, bindRowCallback) headsUpViewBinder.setPresenter(presenter) headsUpViewBinder.setPresenter(presenter) notifBindPipelineInitializer.initialize() notifBindPipelineInitializer.initialize() animatedImageNotificationManager.bind() animatedImageNotificationManager.bind() Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt +0 −2 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,6 @@ import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.Snoo import com.android.systemui.statusbar.NotificationListener import com.android.systemui.statusbar.NotificationListener import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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.collection.render.NotifStackController import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfaces Loading @@ -40,7 +39,6 @@ class NotificationsControllerStub @Inject constructor( listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) { ) { // Always connect the listener even if notification-handling is disabled. Being a listener // Always connect the listener even if notification-handling is disabled. Being a listener // grants special permissions and it's not clear if other things will break if we lose those // grants special permissions and it's not clear if other things will break if we lose those Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -42,6 +42,11 @@ public interface NotificationPresenter extends ExpandableNotificationRow.OnExpan */ */ void onUserSwitched(int newUserId); void onUserSwitched(int newUserId); /** * Called when a new row is created and bound to a notification. */ void onBindRow(ExpandableNotificationRow row); /** /** * @return true iff the device is in vr mode * @return true iff the device is in vr mode */ */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +2 −13 Original line number Original line Diff line number Diff line Loading @@ -71,7 +71,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { private NotificationPresenter mPresenter; private NotificationPresenter mPresenter; private NotificationListContainer mListContainer; private NotificationListContainer mListContainer; private BindRowCallback mBindRowCallback; private NotificationClicker mNotificationClicker; private NotificationClicker mNotificationClicker; private FeatureFlags mFeatureFlags; private FeatureFlags mFeatureFlags; Loading Loading @@ -103,11 +102,9 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { * Sets up late-bound dependencies for this component. * Sets up late-bound dependencies for this component. */ */ public void setUpWithPresenter(NotificationPresenter presenter, public void setUpWithPresenter(NotificationPresenter presenter, NotificationListContainer listContainer, NotificationListContainer listContainer) { BindRowCallback bindRowCallback) { mPresenter = presenter; mPresenter = presenter; mListContainer = listContainer; mListContainer = listContainer; mBindRowCallback = bindRowCallback; mIconManager.attach(); mIconManager.attach(); } } Loading Loading @@ -179,7 +176,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { mNotificationRemoteInputManager.bindRow(row); mNotificationRemoteInputManager.bindRow(row); entry.setRow(row); entry.setRow(row); mNotifBindPipeline.manageRow(entry, row); mNotifBindPipeline.manageRow(entry, row); mBindRowCallback.onBindRow(row); mPresenter.onBindRow(row); row.setInlineReplyAnimationFlagEnabled( row.setInlineReplyAnimationFlagEnabled( mFeatureFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION)); mFeatureFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION)); } } Loading Loading @@ -235,12 +232,4 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { } } }); }); } } /** Callback for when a row is bound to an entry. */ public interface BindRowCallback { /** * Called when a new row is created and bound to a notification. */ void onBindRow(ExpandableNotificationRow row); } } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsController.kt +0 −2 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.service.notification.StatusBarNotification import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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.collection.render.NotifStackController import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfaces Loading @@ -38,7 +37,6 @@ interface NotificationsController { listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) ) fun resetUserExpandedStates() fun resetUserExpandedStates() Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +1 −5 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,6 @@ class NotificationsControllerImpl @Inject constructor( listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) { ) { notificationListener.registerAsSystemService() notificationListener.registerAsSystemService() Loading @@ -97,10 +96,7 @@ class NotificationsControllerImpl @Inject constructor( clickerBuilder.build( clickerBuilder.build( Optional.ofNullable(centralSurfaces), bubblesOptional, Optional.ofNullable(centralSurfaces), bubblesOptional, notificationActivityStarter)) notificationActivityStarter)) notificationRowBinder.setUpWithPresenter( notificationRowBinder.setUpWithPresenter(presenter, listContainer) presenter, listContainer, bindRowCallback) headsUpViewBinder.setPresenter(presenter) headsUpViewBinder.setPresenter(presenter) notifBindPipelineInitializer.initialize() notifBindPipelineInitializer.initialize() animatedImageNotificationManager.bind() animatedImageNotificationManager.bind() Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerStub.kt +0 −2 Original line number Original line Diff line number Diff line Loading @@ -21,7 +21,6 @@ import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.Snoo import com.android.systemui.statusbar.NotificationListener import com.android.systemui.statusbar.NotificationListener import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.NotificationActivityStarter 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.collection.render.NotifStackController import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfaces Loading @@ -40,7 +39,6 @@ class NotificationsControllerStub @Inject constructor( listContainer: NotificationListContainer, listContainer: NotificationListContainer, stackController: NotifStackController, stackController: NotifStackController, notificationActivityStarter: NotificationActivityStarter, notificationActivityStarter: NotificationActivityStarter, bindRowCallback: NotificationRowBinderImpl.BindRowCallback ) { ) { // Always connect the listener even if notification-handling is disabled. Being a listener // Always connect the listener even if notification-handling is disabled. Being a listener // grants special permissions and it's not clear if other things will break if we lose those // grants special permissions and it's not clear if other things will break if we lose those Loading