Loading packages/SystemUI/src/com/android/systemui/flags/Flags.java +0 −7 Original line number Diff line number Diff line Loading @@ -61,10 +61,6 @@ public class Flags { public static final ResourceBooleanFlag NOTIFICATION_DRAG_TO_CONTENTS = new ResourceBooleanFlag(108, R.bool.config_notificationToContents); // TODO(b/254512703): Tracking Bug public static final ReleasedFlag REMOVE_UNRANKED_NOTIFICATIONS = new ReleasedFlag(109); // TODO(b/254512517): Tracking Bug public static final UnreleasedFlag FSI_REQUIRES_KEYGUARD = new UnreleasedFlag(110, true); Loading Loading @@ -158,9 +154,6 @@ public class Flags { /***************************************/ // 400 - smartspace // TODO(b/254513080): Tracking Bug public static final ReleasedFlag SMARTSPACE_DEDUPING = new ReleasedFlag(400); // TODO(b/254513100): Tracking Bug public static final ReleasedFlag SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED = Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt +1 −6 Original line number Diff line number Diff line Loading @@ -28,12 +28,7 @@ class NotifPipelineFlags @Inject constructor( fun isDevLoggingEnabled(): Boolean = featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING) fun isSmartspaceDedupingEnabled(): Boolean = featureFlags.isEnabled(Flags.SMARTSPACE) && featureFlags.isEnabled(Flags.SMARTSPACE_DEDUPING) fun removeUnrankedNotifs(): Boolean = featureFlags.isEnabled(Flags.REMOVE_UNRANKED_NOTIFICATIONS) fun isSmartspaceDedupingEnabled(): Boolean = featureFlags.isEnabled(Flags.SMARTSPACE) fun fullScreenIntentRequiresKeyguard(): Boolean = featureFlags.isEnabled(Flags.FSI_REQUIRES_KEYGUARD) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +1 −1 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ public class NotifCollection implements Dumpable, PipelineDumpable { mInconsistencyTracker.logNewMissingNotifications(rankingMap); mInconsistencyTracker.logNewInconsistentRankings(currentEntriesWithoutRankings, rankingMap); if (currentEntriesWithoutRankings != null && mNotifPipelineFlags.removeUnrankedNotifs()) { if (currentEntriesWithoutRankings != null) { for (NotificationEntry entry : currentEntriesWithoutRankings.values()) { entry.mCancellationReason = REASON_UNKNOWN; tryRemoveNotification(entry); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java +1 −38 Original line number Diff line number Diff line Loading @@ -1498,45 +1498,8 @@ public class NotifCollectionTest extends SysuiTestCase { } @Test public void testMissingRankingWhenRemovalFeatureIsDisabled() { public void testMissingRanking() { // GIVEN a pipeline with one two notifications when(mNotifPipelineFlags.removeUnrankedNotifs()).thenReturn(false); String key1 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 1, "myTag")).key; String key2 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 2, "myTag")).key; NotificationEntry entry1 = mCollectionListener.getEntry(key1); NotificationEntry entry2 = mCollectionListener.getEntry(key2); clearInvocations(mCollectionListener); // GIVEN the message for removing key1 gets does not reach NotifCollection Ranking ranking1 = mNoMan.removeRankingWithoutEvent(key1); // WHEN the message for removing key2 arrives mNoMan.retractNotif(entry2.getSbn(), REASON_APP_CANCEL); // THEN only entry2 gets removed verify(mCollectionListener).onEntryRemoved(eq(entry2), eq(REASON_APP_CANCEL)); verify(mCollectionListener).onEntryCleanUp(eq(entry2)); verify(mCollectionListener).onRankingApplied(); verifyNoMoreInteractions(mCollectionListener); verify(mLogger).logMissingRankings(eq(List.of(entry1)), eq(1), any()); verify(mLogger, never()).logRecoveredRankings(any(), anyInt()); clearInvocations(mCollectionListener, mLogger); // WHEN a ranking update includes key1 again mNoMan.setRanking(key1, ranking1); mNoMan.issueRankingUpdate(); // VERIFY that we do nothing but log the 'recovery' verify(mCollectionListener).onRankingUpdate(any()); verify(mCollectionListener).onRankingApplied(); verifyNoMoreInteractions(mCollectionListener); verify(mLogger, never()).logMissingRankings(any(), anyInt(), any()); verify(mLogger).logRecoveredRankings(eq(List.of(key1)), eq(0)); } @Test public void testMissingRankingWhenRemovalFeatureIsEnabled() { // GIVEN a pipeline with one two notifications when(mNotifPipelineFlags.removeUnrankedNotifs()).thenReturn(true); String key1 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 1, "myTag")).key; String key2 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 2, "myTag")).key; NotificationEntry entry1 = mCollectionListener.getEntry(key1); Loading Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.java +0 −7 Original line number Diff line number Diff line Loading @@ -61,10 +61,6 @@ public class Flags { public static final ResourceBooleanFlag NOTIFICATION_DRAG_TO_CONTENTS = new ResourceBooleanFlag(108, R.bool.config_notificationToContents); // TODO(b/254512703): Tracking Bug public static final ReleasedFlag REMOVE_UNRANKED_NOTIFICATIONS = new ReleasedFlag(109); // TODO(b/254512517): Tracking Bug public static final UnreleasedFlag FSI_REQUIRES_KEYGUARD = new UnreleasedFlag(110, true); Loading Loading @@ -158,9 +154,6 @@ public class Flags { /***************************************/ // 400 - smartspace // TODO(b/254513080): Tracking Bug public static final ReleasedFlag SMARTSPACE_DEDUPING = new ReleasedFlag(400); // TODO(b/254513100): Tracking Bug public static final ReleasedFlag SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED = Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt +1 −6 Original line number Diff line number Diff line Loading @@ -28,12 +28,7 @@ class NotifPipelineFlags @Inject constructor( fun isDevLoggingEnabled(): Boolean = featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING) fun isSmartspaceDedupingEnabled(): Boolean = featureFlags.isEnabled(Flags.SMARTSPACE) && featureFlags.isEnabled(Flags.SMARTSPACE_DEDUPING) fun removeUnrankedNotifs(): Boolean = featureFlags.isEnabled(Flags.REMOVE_UNRANKED_NOTIFICATIONS) fun isSmartspaceDedupingEnabled(): Boolean = featureFlags.isEnabled(Flags.SMARTSPACE) fun fullScreenIntentRequiresKeyguard(): Boolean = featureFlags.isEnabled(Flags.FSI_REQUIRES_KEYGUARD) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +1 −1 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ public class NotifCollection implements Dumpable, PipelineDumpable { mInconsistencyTracker.logNewMissingNotifications(rankingMap); mInconsistencyTracker.logNewInconsistentRankings(currentEntriesWithoutRankings, rankingMap); if (currentEntriesWithoutRankings != null && mNotifPipelineFlags.removeUnrankedNotifs()) { if (currentEntriesWithoutRankings != null) { for (NotificationEntry entry : currentEntriesWithoutRankings.values()) { entry.mCancellationReason = REASON_UNKNOWN; tryRemoveNotification(entry); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java +1 −38 Original line number Diff line number Diff line Loading @@ -1498,45 +1498,8 @@ public class NotifCollectionTest extends SysuiTestCase { } @Test public void testMissingRankingWhenRemovalFeatureIsDisabled() { public void testMissingRanking() { // GIVEN a pipeline with one two notifications when(mNotifPipelineFlags.removeUnrankedNotifs()).thenReturn(false); String key1 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 1, "myTag")).key; String key2 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 2, "myTag")).key; NotificationEntry entry1 = mCollectionListener.getEntry(key1); NotificationEntry entry2 = mCollectionListener.getEntry(key2); clearInvocations(mCollectionListener); // GIVEN the message for removing key1 gets does not reach NotifCollection Ranking ranking1 = mNoMan.removeRankingWithoutEvent(key1); // WHEN the message for removing key2 arrives mNoMan.retractNotif(entry2.getSbn(), REASON_APP_CANCEL); // THEN only entry2 gets removed verify(mCollectionListener).onEntryRemoved(eq(entry2), eq(REASON_APP_CANCEL)); verify(mCollectionListener).onEntryCleanUp(eq(entry2)); verify(mCollectionListener).onRankingApplied(); verifyNoMoreInteractions(mCollectionListener); verify(mLogger).logMissingRankings(eq(List.of(entry1)), eq(1), any()); verify(mLogger, never()).logRecoveredRankings(any(), anyInt()); clearInvocations(mCollectionListener, mLogger); // WHEN a ranking update includes key1 again mNoMan.setRanking(key1, ranking1); mNoMan.issueRankingUpdate(); // VERIFY that we do nothing but log the 'recovery' verify(mCollectionListener).onRankingUpdate(any()); verify(mCollectionListener).onRankingApplied(); verifyNoMoreInteractions(mCollectionListener); verify(mLogger, never()).logMissingRankings(any(), anyInt(), any()); verify(mLogger).logRecoveredRankings(eq(List.of(key1)), eq(0)); } @Test public void testMissingRankingWhenRemovalFeatureIsEnabled() { // GIVEN a pipeline with one two notifications when(mNotifPipelineFlags.removeUnrankedNotifs()).thenReturn(true); String key1 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 1, "myTag")).key; String key2 = mNoMan.postNotif(buildNotif(TEST_PACKAGE, 2, "myTag")).key; NotificationEntry entry1 = mCollectionListener.getEntry(key1); Loading