diff options
| author | Yuri Lin <yurilin@google.com> | 2022-04-12 17:15:14 -0400 |
|---|---|---|
| committer | Yuri Lin <yurilin@google.com> | 2022-04-14 13:23:01 -0400 |
| commit | 937b03e8aba93cf04c79c0b97e5bc54a641debb7 (patch) | |
| tree | b27394339886ad2c140336caee23685c518da668 /core/java/android | |
| parent | 5c011d09c95f5d60f41fdd897088491ebeb41455 (diff) | |
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
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/provider/Settings.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 111c6704a57d..d4ce21eef794 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2013,6 +2013,15 @@ public final class 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> * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. @@ -7670,6 +7679,20 @@ public final class Settings { "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). * @hide |
