diff options
| author | 2024-01-18 18:34:19 -0500 | |
|---|---|---|
| committer | 2024-01-18 18:43:57 -0500 | |
| commit | 2671bd0de6333e9d30c209b798acea7392bc8a22 (patch) | |
| tree | 46124050487635a5140eea274d0354ed9754e325 | |
| parent | e8c4c3b0473637584e1cc55020f8aa3f323972d4 (diff) | |
Update NotifIconAreaCtrlr if NICRefactor is off
Flag: ACONFIG com.android.systemui.notifications_icon_container_refactor STAGING
Bug: 318858608
Test: manual
1. force disable icon container refactor (in code)
2. verify shelf has icons
Change-Id: I68fea0f6fb1b7e8763b5d59e7ed89b766a0f3401
2 files changed, 11 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt index fa2748c1dc77..6e2beb45f3f2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinator.kt @@ -61,7 +61,8 @@ internal constructor( controller.setNotifStats(notifStats) if (NotificationIconContainerRefactor.isEnabled || FooterViewRefactor.isEnabled) { renderListInteractor.setRenderedList(entries) - } else { + } + if (!NotificationIconContainerRefactor.isEnabled) { notificationIconAreaController.updateNotificationIcons(entries) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinatorTest.kt index 9b4a100a1d64..a1daff14eea6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/StackCoordinatorTest.kt @@ -81,7 +81,7 @@ class StackCoordinatorTest : SysuiTestCase() { } @Test - @DisableFlags(NotificationIconContainerRefactor.FLAG_NAME, FooterViewRefactor.FLAG_NAME) + @DisableFlags(NotificationIconContainerRefactor.FLAG_NAME) fun testUpdateNotificationIcons() { afterRenderListListener.onAfterRenderList(listOf(entry), stackController) verify(notificationIconAreaController).updateNotificationIcons(eq(listOf(entry))) @@ -89,7 +89,14 @@ class StackCoordinatorTest : SysuiTestCase() { @Test @EnableFlags(NotificationIconContainerRefactor.FLAG_NAME) - fun testSetRenderedListOnInteractor() { + fun testSetRenderedListOnInteractor_iconContainerFlagOn() { + afterRenderListListener.onAfterRenderList(listOf(entry), stackController) + verify(renderListInteractor).setRenderedList(eq(listOf(entry))) + } + + @Test + @EnableFlags(FooterViewRefactor.FLAG_NAME) + fun testSetRenderedListOnInteractor_footerFlagOn() { afterRenderListListener.onAfterRenderList(listOf(entry), stackController) verify(renderListInteractor).setRenderedList(eq(listOf(entry))) } |