summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-01-25 19:20:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-01-25 19:20:21 +0000
commit142cbdd474539626db7e4cb875c055df158b467b (patch)
treebc694f7c0da0ecb3606873b6165be8e1b0e39fb5 /core/java
parentfbcb01cde703e8c679c3c3545ca4229385f0c2db (diff)
parent9ba0c613a5ee23d70b87bb65cb4638c5afeec6b1 (diff)
Merge "Expose intents for launching channel settings."
Diffstat (limited to 'core/java')
-rwxr-xr-xcore/java/android/provider/Settings.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 9e2d4a7b2370..b92d29339afb 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.