Add apis for notification channel editing
Allow apps to launch a mini notification channel editing UI targeted at the fields the user wants to edit depending on the launch context. Test: Settings robotests Bug: 177246841 Change-Id: I4ca552ff80e7c55c6845022ef94361fae4cd8e20
This commit is contained in:
@@ -6062,6 +6062,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 {
|
||||
@@ -34699,6 +34706,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";
|
||||
|
||||
@@ -79,6 +79,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.
|
||||
|
||||
@@ -1901,6 +1901,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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user