Remove FSI_ON_DND_UPDATE flag
Test: atest SystemUITests Fixes: 259130119 Change-Id: I38442212b2200b6e7e70b3ab5597398a94984c7e
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
@@ -853,39 +849,8 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user