diff options
| author | 2021-11-11 03:52:25 +0000 | |
|---|---|---|
| committer | 2021-11-11 15:22:27 +0000 | |
| commit | f52956124e76ec3241295255dc93085def445ebc (patch) | |
| tree | a1c023da43e40f66525bbfe6ae5508a179364b7a | |
| parent | a1dd246ce6889e1c43a8b9b0667cb508e3502fb5 (diff) | |
New pipeline is always initialized; remove the confusing feature flag.
Fixes: 205966282
Test: manual; no chage observed
Change-Id: I3299eec0b20813acf4fc3dbdf3024087f87be691
7 files changed, 6 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/flags/FeatureFlags.java b/packages/SystemUI/src/com/android/systemui/flags/FeatureFlags.java index 27e254f176fd..5f7ad58ac035 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/FeatureFlags.java +++ b/packages/SystemUI/src/com/android/systemui/flags/FeatureFlags.java @@ -65,10 +65,6 @@ public class FeatureFlags { return false; } - public boolean isNewNotifPipelineEnabled() { - return isEnabled(Flags.NEW_NOTIFICATION_PIPELINE); - } - public boolean isNewNotifPipelineRenderingEnabled() { return isEnabled(Flags.NEW_NOTIFICATION_PIPELINE_RENDERING); } diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.java b/packages/SystemUI/src/com/android/systemui/flags/Flags.java index 5be1cdf11245..ee24f45de756 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.java +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.java @@ -40,9 +40,6 @@ public class Flags { /***************************************/ // 100 - notification - public static final BooleanFlag NEW_NOTIFICATION_PIPELINE = - new BooleanFlag(100, true); - public static final BooleanFlag NEW_NOTIFICATION_PIPELINE_RENDERING = new BooleanFlag(101, false); 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 11b0429d2cf9..757f68a8fbc7 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 @@ -108,7 +108,7 @@ class NotificationsControllerImpl @Inject constructor( notifBindPipelineInitializer.initialize() animatedImageNotificationManager.bind() - if (featureFlags.isNewNotifPipelineEnabled) { + if (INITIALIZE_NEW_PIPELINE) { newNotifPipeline.get().initialize( notificationListener, notificationRowBinder, @@ -170,4 +170,9 @@ class NotificationsControllerImpl @Inject constructor( override fun getActiveNotificationsCount(): Int { return entryManager.activeNotificationsCount } + + companion object { + // NOTE: The new pipeline is always active, even if the old pipeline is *rendering*. + private const val INITIALIZE_NEW_PIPELINE = true + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationViewHierarchyManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationViewHierarchyManagerTest.java index acd62b2fabe7..9a23eb69f7ad 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationViewHierarchyManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationViewHierarchyManagerTest.java @@ -103,7 +103,6 @@ public class NotificationViewHierarchyManagerTest extends SysuiTestCase { when(mVisualStabilityManager.areGroupChangesAllowed()).thenReturn(true); when(mVisualStabilityManager.isReorderingAllowed()).thenReturn(true); - when(mFeatureFlags.isNewNotifPipelineEnabled()).thenReturn(false); when(mFeatureFlags.checkLegacyPipelineEnabled()).thenReturn(true); mHelper = new NotificationTestHelper(mContext, mDependency, TestableLooper.get(this)); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java index 902d11575597..f8effa1a3424 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java @@ -192,7 +192,6 @@ public class NotificationEntryManagerTest extends SysuiTestCase { mEntry = createNotification(); mSbn = mEntry.getSbn(); - when(mFeatureFlags.isNewNotifPipelineEnabled()).thenReturn(false); when(mFeatureFlags.isNewNotifPipelineRenderingEnabled()).thenReturn(false); mEntryManager = new NotificationEntryManager( mLogger, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java index f08a74ab1316..cf90cef6dae5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java @@ -145,7 +145,6 @@ public class NotifCollectionTest extends SysuiTestCase { allowTestableLooperAsMainThread(); when(mFeatureFlags.isNewNotifPipelineRenderingEnabled()).thenReturn(true); - when(mFeatureFlags.isNewNotifPipelineEnabled()).thenReturn(true); when(mEulogizer.record(any(Exception.class))).thenAnswer(i -> i.getArguments()[0]); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java index 0d996025392f..a53fb781ca8c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java @@ -179,7 +179,6 @@ public class NotificationEntryManagerInflationTest extends SysuiTestCase { .setNotification(notification) .build(); - when(mFeatureFlags.isNewNotifPipelineEnabled()).thenReturn(false); when(mFeatureFlags.isNewNotifPipelineRenderingEnabled()).thenReturn(false); mEntryManager = new NotificationEntryManager( |