diff options
| author | Julia Reynolds <juliacr@google.com> | 2017-01-25 10:31:34 -0500 |
|---|---|---|
| committer | Julia Reynolds <juliacr@google.com> | 2017-01-25 12:43:13 -0500 |
| commit | 9ba0c613a5ee23d70b87bb65cb4638c5afeec6b1 (patch) | |
| tree | 9f9446233a0511770562faf0054db7f51e94960f /core/java/android | |
| parent | 2a128746b3466e75b6040147fa831fe12cc2ccbb (diff) | |
Expose intents for launching channel settings.
Test: manual
Change-Id: I86e12b0ed6b60660b9f6bd1015c186897418560e
Diffstat (limited to 'core/java/android')
| -rwxr-xr-x | core/java/android/provider/Settings.java | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index e3da337d9e6a..5f0e15739424 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -30,6 +30,7 @@ import android.annotation.UserIdInt; import android.app.ActivityThread; import android.app.AppOpsManager; import android.app.Application; +import android.app.NotificationChannel; import android.app.SearchManager; import android.app.WallpaperManager; import android.content.ComponentName; @@ -1274,6 +1275,7 @@ public final class Settings { /** * Activity Action: Show notification settings for a single app. * + * Input: Optionally, {@link #EXTRA_CHANNEL_ID}, to highlight that channel. * @hide */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) @@ -1281,6 +1283,35 @@ public final class Settings { = "android.settings.APP_NOTIFICATION_SETTINGS"; /** + * Activity Action: Show notification settings for a single {@link NotificationChannel}. + * <p> + * Must be called from an activity. + * <p> + * Input: {@link #EXTRA_APP_PACKAGE}, the package containing the channel to display. + * Input: {@link #EXTRA_CHANNEL_ID}, the id of the channel to display. + * <p> + * Output: Nothing. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_CHANNEL_NOTIFICATION_SETTINGS + = "android.settings.CHANNEL_NOTIFICATION_SETTINGS"; + + /** + * Activity Extra: The package owner of the notification channel settings to display. + * <p> + * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. + */ + public static final String EXTRA_APP_PACKAGE = "android.provider.extra.APP_PACKAGE"; + + /** + * Activity Extra: The {@link NotificationChannel#getId()} of the notification channel settings + * to display. + * <p> + * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. + */ + public static final String EXTRA_CHANNEL_ID = "android.provider.extra.CHANNEL_ID"; + + /** * Activity Action: Show notification redaction settings. * * @hide @@ -1290,7 +1321,6 @@ public final class Settings { = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; /** @hide */ public static final String EXTRA_APP_UID = "app_uid"; - /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package"; /** * Activity Action: Show a dialog with disabled by policy message. |
