diff options
| author | 2023-04-05 13:48:45 -0400 | |
|---|---|---|
| committer | 2023-04-13 15:51:34 -0400 | |
| commit | 1314f5da7cc2a14437f6e5c382d40667d25352f6 (patch) | |
| tree | facaa01daad4fd067c9fa7ce7fcf3387e2794e10 | |
| parent | d9296629f0ef2f5449cc885c21c95c6d999f09b6 (diff) | |
Remove FSI_ON_DND_UPDATE flag
Test: atest SystemUITests
Fixes: 259130119
Change-Id: I38442212b2200b6e7e70b3ab5597398a94984c7e
4 files changed, 2 insertions, 55 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index c995c47a358a..d74717a9cac5 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -58,9 +58,6 @@ object Flags { "notification_drag_to_contents" ) - // TODO(b/259130119): Tracking Bug - val FSI_ON_DND_UPDATE = releasedFlag(259130119, "fsi_on_dnd_update") - // TODO(b/254512538): Tracking Bug val INSTANT_VOICE_REPLY = unreleasedFlag(111, "instant_voice_reply") diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt index fb8704750304..5f28ecb56b8c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt @@ -31,8 +31,6 @@ class NotifPipelineFlags @Inject constructor( fun isDevLoggingEnabled(): Boolean = featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING) - fun fsiOnDNDUpdate(): Boolean = featureFlags.isEnabled(Flags.FSI_ON_DND_UPDATE) - fun allowDismissOngoing(): Boolean = sysPropFlags.isEnabled(NotificationFlags.ALLOW_DISMISS_ONGOING) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt index 4d0e746735aa..0529c94ed59a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt @@ -392,8 +392,7 @@ class HeadsUpCoordinator @Inject constructor( mNotificationInterruptStateProvider.logFullScreenIntentDecision(entry, fsiDecision) if (fsiDecision.shouldLaunch) { mLaunchFullScreenIntentProvider.launchFullScreenIntent(entry) - } else if (mFlags.fsiOnDNDUpdate() && - fsiDecision == FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) { + } else if (fsiDecision == FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) { // If DND was the only reason this entry was suppressed, note it for potential // reconsideration on later ranking updates. addForFSIReconsideration(entry, mSystemClock.currentTimeMillis()) @@ -509,7 +508,7 @@ class HeadsUpCoordinator @Inject constructor( // - was suppressed from FSI launch only by a DND suppression // - is within the recency window for reconsideration // If any of these entries are no longer suppressed, launch the FSI now. - if (mFlags.fsiOnDNDUpdate() && isCandidateForFSIReconsideration(entry)) { + if (isCandidateForFSIReconsideration(entry)) { val decision = mNotificationInterruptStateProvider.getFullScreenIntentDecision(entry) if (decision.shouldLaunch) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt index dba83d177383..67128ff5624a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt @@ -22,7 +22,6 @@ import android.testing.TestableLooper.RunWithLooper import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.dump.logcatLogBuffer -import com.android.systemui.flags.Flags import com.android.systemui.statusbar.NotificationRemoteInputManager import com.android.systemui.statusbar.notification.NotifPipelineFlags import com.android.systemui.statusbar.notification.collection.GroupEntryBuilder @@ -171,9 +170,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { // Set the default FSI decision setShouldFullScreen(any(), FullScreenIntentDecision.NO_FULL_SCREEN_INTENT) - - // Run tests with default feature flag state - whenever(flags.fsiOnDNDUpdate()).thenReturn(Flags.FSI_ON_DND_UPDATE.default) } @Test @@ -854,38 +850,7 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { } @Test - fun testOnRankingApplied_noFSIOnUpdateWhenFlagOff() { - // Ensure the feature flag is off - whenever(flags.fsiOnDNDUpdate()).thenReturn(false) - - // GIVEN that mEntry was previously suppressed from full-screen only by DND - setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) - collectionListener.onEntryAdded(entry) - - // Verify that this causes a log - verifyLoggedFullScreenIntentDecision( - entry, - FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND - ) - clearInterruptionProviderInvocations() - - // and it is then updated to allow full screen - setShouldFullScreen(entry, FullScreenIntentDecision.FSI_DEVICE_NOT_INTERACTIVE) - whenever(notifPipeline.allNotifs).thenReturn(listOf(entry)) - collectionListener.onRankingApplied() - - // THEN it should not full screen because the feature is off - verify(launchFullScreenIntentProvider, never()).launchFullScreenIntent(any()) - - // VERIFY that no additional logging happens either - verifyNoFullScreenIntentDecisionLogged() - } - - @Test fun testOnRankingApplied_updateToFullScreen() { - // Turn on the feature - whenever(flags.fsiOnDNDUpdate()).thenReturn(true) - // GIVEN that mEntry was previously suppressed from full-screen only by DND setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) collectionListener.onEntryAdded(entry) @@ -929,9 +894,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { @Test fun testOnRankingApplied_withOnlyDndSuppressionAllowsFsiLater() { - // Turn on the feature - whenever(flags.fsiOnDNDUpdate()).thenReturn(true) - // GIVEN that mEntry was previously suppressed from full-screen only by DND setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) collectionListener.onEntryAdded(entry) @@ -980,9 +942,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { @Test fun testOnRankingApplied_newNonFullScreenAnswerInvalidatesCandidate() { - // Turn on the feature - whenever(flags.fsiOnDNDUpdate()).thenReturn(true) - // GIVEN that mEntry was previously suppressed from full-screen only by DND whenever(notifPipeline.allNotifs).thenReturn(listOf(entry)) setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) @@ -1018,9 +977,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { @Test fun testOnRankingApplied_noFSIWhenAlsoSuppressedForOtherReasons() { - // Feature on - whenever(flags.fsiOnDNDUpdate()).thenReturn(true) - // GIVEN that mEntry is suppressed by DND (functionally), but not *only* DND setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_BY_DND) collectionListener.onEntryAdded(entry) @@ -1035,9 +991,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() { @Test fun testOnRankingApplied_noFSIWhenTooOld() { - // Feature on - whenever(flags.fsiOnDNDUpdate()).thenReturn(true) - // GIVEN that mEntry is suppressed only by DND setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) collectionListener.onEntryAdded(entry) |