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

Commit 937b03e8 authored by Yuri Lin's avatar Yuri Lin
Browse files

Add strings to Settings.Secure for notification permission

The Settings.Secure string is used for the "review notification permissions" notification that will be shown to users upon upgrade to T, and will track state for whether the user has seen and interacted with the notification yet.

The action is an internal intent to go to the app notification settings page. This intent and activity need to be non-exported to disallow other apps from causing writes to settings.

Bug: 225373531
Test: manual with change to show the notification
Change-Id: I3ad1a3043eb428fab93e15d8f5ae1ada884b010f
parent 5c011d09
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -2012,6 +2012,15 @@ public final class Settings {
    public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS =
            "android.settings.ALL_APPS_NOTIFICATION_SETTINGS";
    /**
     * Activity Action: Show app settings specifically for sending notifications. Same as
     * ALL_APPS_NOTIFICATION_SETTINGS but meant for internal use.
     * @hide
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW =
            "android.settings.ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW";
    /**
     * Activity Action: Show notification settings for a single app.
     * <p>
@@ -7669,6 +7678,20 @@ public final class Settings {
        public static final String ZEN_SETTINGS_SUGGESTION_VIEWED =
                "zen_settings_suggestion_viewed";
        /**
         * State of whether review notification permissions notification needs to
         * be shown the user, and whether the user has interacted.
         *
         * Valid values:
         *   -1 = UNKNOWN
         *    0 = SHOULD_SHOW
         *    1 = USER_INTERACTED
         *    2 = DISMISSED
         * @hide
         */
        public static final String REVIEW_PERMISSIONS_NOTIFICATION_STATE =
                "review_permissions_notification_state";
        /**
         * Whether the in call notification is enabled to play sound during calls.  The value is
         * boolean (1 or 0).