Remove some instances of using NEM

Test: Manual w/ new pipeline
Change-Id: I8827349070d8650262e392f73343b2fa8bf1d41a
This commit is contained in:
Jeff DeCew
2021-11-19 15:50:59 +00:00
parent 073eacec43
commit 533fa15164

View File

@@ -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*.