diff options
| -rw-r--r-- | core/api/current.txt | 8 | ||||
| -rw-r--r-- | core/java/android/app/NotificationChannel.java | 42 | ||||
| -rw-r--r-- | core/java/android/provider/Settings.java | 12 |
3 files changed, 62 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index a280557fc09e..8fe79e6ee999 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -6074,6 +6074,13 @@ package android.app { method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.app.NotificationChannel> CREATOR; field public static final String DEFAULT_CHANNEL_ID = "miscellaneous"; + field public static final String EDIT_CONVERSATION = "convo"; + field public static final String EDIT_IMPORTANCE = "importance"; + field public static final String EDIT_LAUNCHER = "launcher"; + field public static final String EDIT_LOCKED_DEVICE = "locked"; + field public static final String EDIT_SOUND = "sound"; + field public static final String EDIT_VIBRATION = "vibration"; + field public static final String EDIT_ZEN = "dnd"; } public final class NotificationChannelGroup implements android.os.Parcelable { @@ -34765,6 +34772,7 @@ package android.provider { field public static final String EXTRA_AUTHORITIES = "authorities"; field public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED = "android.settings.extra.battery_saver_mode_enabled"; field public static final String EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED = "android.provider.extra.BIOMETRIC_AUTHENTICATORS_ALLOWED"; + field public static final String EXTRA_CHANNEL_FILTER_LIST = "android.provider.extra.CHANNEL_FILTER_LIST"; field public static final String EXTRA_CHANNEL_ID = "android.provider.extra.CHANNEL_ID"; field public static final String EXTRA_CONVERSATION_ID = "android.provider.extra.CONVERSATION_ID"; field public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = "android.settings.extra.do_not_disturb_mode_enabled"; 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 |