diff options
| author | 2021-11-19 15:50:59 +0000 | |
|---|---|---|
| committer | 2021-11-20 20:05:38 +0000 | |
| commit | 533fa15164f7bfab1d7f13fdda7dc879cfd3ef1f (patch) | |
| tree | 91b31d241a0d2f684eae20f39d58531b3f071dc0 | |
| parent | 073eacec43074753c44e5f2345deb72e64d82bcf (diff) | |
Remove some instances of using NEM
Test: Manual w/ new pipeline
Change-Id: I8827349070d8650262e392f73343b2fa8bf1d41a
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt | 21 |
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*. |