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

Commit de3bc236 authored by Yining Liu's avatar Yining Liu
Browse files

Add documentation for NOTIFICATION_SHOW_ONLY_UNSEEN_NOTIFICATIONS

Add documentation for NOTIFICATION_SHOW_ONLY_UNSEEN_NOTIFICATIONS.
NOTIFICATION_SHOW_ONLY_UNSEEN_NOTIFICATIONS has three states:
0: unset_off, which is the default value for phones
1: on
2: off

Bug: 391889319
Flag: DOCS_ONLY
Test: manual
Change-Id: Ie7e66116098fdd64d66802e28829ecda54b2ea8e
parent 02151cbb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -10981,7 +10981,10 @@ public final class Settings {
        /**
         * Indicates whether "seen" notifications should be suppressed from the lockscreen.
         * <p>
         * Type: int (0 for unset, 1 for true, 2 for false)
         * Type: int (0 for unset_off, 1 for true, 2 for false)
         * 0 is the default value for phones, which is equivalent to off in effect, before
         * the notification minimalism feature, this setting is default hidden to phones, we use
         * 0 instead of 2 to mark that we need to hide this setting toggle in the Settings app.
         *
         * @hide
         */
+7 −1
Original line number Diff line number Diff line
@@ -96,6 +96,12 @@ constructor(
            }
        }

    /**
     * There are three states for LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS
     * 0: unset_off, default value for phones
     * 1: on, default value for tablets
     * 2: off
     */
    fun isLockScreenShowOnlyUnseenNotificationsEnabled(): Flow<Boolean> =
        secureSettings
            // emit whenever the setting has changed
@@ -109,7 +115,7 @@ constructor(
            .map {
                secureSettings.getIntForUser(
                    name = Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
                    default = 0,
                    default = 0, // 0 is unset_off, which should be treated as off
                    userHandle = UserHandle.USER_CURRENT,
                ) == 1
            }