summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt21
1 files changed, 15 insertions, 6 deletions
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 9411de75ba7f..999ef9c99dd2 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
@@ -47,7 +47,7 @@ import com.android.wm.shell.bubbles.Bubbles
import dagger.Lazy
import java.io.FileDescriptor
import java.io.PrintWriter
-import java.util.*
+import java.util.Optional
import javax.inject.Inject
/**
@@ -152,8 +152,14 @@ class NotificationsControllerImpl @Inject constructor(
}
override fun resetUserExpandedStates() {
- for (entry in entryManager.visibleNotifications) {
- entry.resetUserExpansion()
+ if (notifPipelineFlags.isNewPipelineEnabled()) {
+ for (entry in notifPipeline.get().allNotifs) {
+ entry.resetUserExpansion()
+ }
+ } else {
+ for (entry in entryManager.visibleNotifications) {
+ entry.resetUserExpansion()
+ }
}
}
@@ -167,9 +173,12 @@ class NotificationsControllerImpl @Inject constructor(
}
}
- override fun getActiveNotificationsCount(): Int {
- return entryManager.activeNotificationsCount
- }
+ override fun getActiveNotificationsCount(): Int =
+ if (notifPipelineFlags.isNewPipelineEnabled()) {
+ notifPipeline.get().getShadeListCount()
+ } else {
+ entryManager.activeNotificationsCount
+ }
companion object {
// NOTE: The new pipeline is always active, even if the old pipeline is *rendering*.