diff options
| author | Julia Reynolds <juliacr@google.com> | 2021-02-17 14:12:03 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-02-17 14:12:03 +0000 |
| commit | 94bfa64f014711f79e04882d9deba545e2a11e96 (patch) | |
| tree | 834a573801a1a81e94c27570e04a10aa72a07145 /core/java/android | |
| parent | ce47297194c4c2fae1ad93c0c6adf8c9ebbbea0a (diff) | |
| parent | 48d8f95d1b9f64406800f52504461dd77f4f5d5d (diff) | |
Merge "Add apis for notification channel editing" into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/NotificationChannel.java | 42 | ||||
| -rw-r--r-- | core/java/android/provider/Settings.java | 12 |
2 files changed, 54 insertions, 0 deletions
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java index 323af8211d76..685c222539c6 100644 --- a/core/java/android/app/NotificationChannel.java +++ b/core/java/android/app/NotificationChannel.java @@ -80,6 +80,48 @@ public final class NotificationChannel implements Parcelable { public static final String PLACEHOLDER_CONVERSATION_ID = ":placeholder_id"; /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing sound, like a tone picker + * ({@link #setSound(Uri, AudioAttributes)}). + */ + public static final String EDIT_SOUND = "sound"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing vibration ({@link #enableVibration(boolean)}, + * {@link #setVibrationPattern(long[])}). + */ + public static final String EDIT_VIBRATION = "vibration"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing importance ({@link #setImportance(int)}) and/or conversation + * priority. + */ + public static final String EDIT_IMPORTANCE = "importance"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing behavior on devices that are locked or have a turned off + * display ({@link #setLockscreenVisibility(int)}, {@link #enableLights(boolean)}, + * {@link #setLightColor(int)}). + */ + public static final String EDIT_LOCKED_DEVICE = "locked"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing do not disturb bypass {(@link #setBypassDnd(boolean)}) . + */ + public static final String EDIT_ZEN = "dnd"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing conversation settings (demoting or restoring a channel to + * be a Conversation, changing bubble behavior, or setting the priority of a conversation). + */ + public static final String EDIT_CONVERSATION = "convo"; + /** + * Extra value for {@link Settings#EXTRA_CHANNEL_FILTER_LIST}. Include to show fields + * that have to do with editing launcher behavior (showing badges)}. + */ + public static final String EDIT_LAUNCHER = "launcher"; + + /** * The maximum length for text fields in a NotificationChannel. Fields will be truncated at this * limit. */ diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index f02e53249ce4..e979e13d89c5 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1902,6 +1902,18 @@ public final class Settings { public static final String EXTRA_CONVERSATION_ID = "android.provider.extra.CONVERSATION_ID"; /** + * Activity Extra: An {@code Arraylist<String>} of {@link NotificationChannel} field names to + * show on the Settings UI. + * + * <p> + * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If + * included the system will filter out any Settings that doesn't appear in this list that + * otherwise would display. + */ + public static final String EXTRA_CHANNEL_FILTER_LIST + = "android.provider.extra.CHANNEL_FILTER_LIST"; + + /** * Activity Action: Show notification redaction settings. * * @hide |
