Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7d91592 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Remove the "ungroupTopUnseen" prototype setting

Bug: 330387368
Flag: com.android.server.notification.notification_minimalism
Test: LockScreenMinimalismCoordinatorTest
Change-Id: I2bc88bf8c1c140fdd0f90a223a6da781f969d396
parent fe9ee5b6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -196,16 +196,14 @@ class LockScreenMinimalismCoordinatorTest : SysuiTestCase() {
            kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = null
            kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = child2.key
            assertThat(promoter.shouldPromoteToTopLevel(child1)).isFalse()
            assertThat(promoter.shouldPromoteToTopLevel(child2))
                .isEqualTo(NotificationMinimalism.ungroupTopUnseen)
            assertThat(promoter.shouldPromoteToTopLevel(child2)).isFalse()
            assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
            assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()

            kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = child1.key
            kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = child2.key
            assertThat(promoter.shouldPromoteToTopLevel(child1)).isTrue()
            assertThat(promoter.shouldPromoteToTopLevel(child2))
                .isEqualTo(NotificationMinimalism.ungroupTopUnseen)
            assertThat(promoter.shouldPromoteToTopLevel(child2)).isFalse()
            assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
            assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()
        }
+1 −2
Original line number Diff line number Diff line
@@ -219,8 +219,7 @@ constructor(
                    NotificationMinimalism.isUnexpectedlyInLegacyMode() -> false
                    !minimalismEnabled -> false
                    seenNotificationsInteractor.isTopOngoingNotification(child) -> true
                    !NotificationMinimalism.ungroupTopUnseen -> false
                    else -> seenNotificationsInteractor.isTopUnseenNotification(child)
                    else -> false
                }
        }

+0 −13
Original line number Diff line number Diff line
@@ -35,19 +35,6 @@ object NotificationMinimalism {
    inline val isEnabled
        get() = Flags.notificationMinimalism()

    /**
     * The prototype will (by default) use a promoter to ensure that the top unseen notification is
     * not grouped, but this property read allows that behavior to be disabled.
     */
    val ungroupTopUnseen: Boolean
        get() =
            if (isUnexpectedlyInLegacyMode()) false
            else
                SystemProperties.getBoolean(
                    "persist.notification_minimalism_prototype.ungroup_top_unseen",
                    false
                )

    /**
     * Called to ensure code is only run when the flag is enabled. This protects users from the
     * unintended behaviors caused by accidentally running new logic, while also crashing on an eng