Loading core/api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -12886,7 +12886,14 @@ package android.service.notification { field public static final String KEY_SENSITIVE_CONTENT = "key_sensitive_content"; field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria"; field public static final String KEY_TEXT_REPLIES = "key_text_replies"; field @FlaggedApi("android.service.notification.notification_classification") public static final String KEY_TYPE = "key_type"; field public static final String KEY_USER_SENTIMENT = "key_user_sentiment"; field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_CONTENT_RECOMMENDATION = 4; // 0x4 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_NEWS = 3; // 0x3 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_OTHER = 0; // 0x0 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_PROMOTION = 1; // 0x1 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_SOCIAL_MEDIA = 2; // 0x2 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_UNKNOWN = -1; // 0xffffffff } public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService { core/api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ package android.app { method public void setImportantConversation(boolean); method public void setOriginalImportance(int); method public void setUserVisibleTaskShown(boolean); field @FlaggedApi("android.service.notification.notification_classification") public static final String NEWS_ID = "android.app.news"; field @FlaggedApi("android.service.notification.notification_classification") public static final String PROMOTIONS_ID = "android.app.promotions"; field @FlaggedApi("android.service.notification.notification_classification") public static final String RECS_ID = "android.app.recs"; field @FlaggedApi("android.service.notification.notification_classification") public static final String SOCIAL_MEDIA_ID = "android.app.social"; } public final class NotificationChannelGroup implements android.os.Parcelable { Loading core/java/android/app/NotificationChannel.java +29 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,35 @@ public final class NotificationChannel implements Parcelable { */ public static final String DEFAULT_CHANNEL_ID = "miscellaneous"; /** * A reserved id for a system channel reserved for promotional notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String PROMOTIONS_ID = "android.app.promotions"; /** * A reserved id for a system channel reserved for non-conversation social media notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String SOCIAL_MEDIA_ID = "android.app.social"; /** * A reserved id for a system channel reserved for news notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String NEWS_ID = "android.app.news"; /** * A reserved id for a system channel reserved for content recommendation notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String RECS_ID = "android.app.recs"; /** * The formatter used by the system to create an id for notification * channels when it automatically creates conversation channels on behalf of an app. The format Loading core/java/android/service/notification/Adjustment.java +57 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package android.service.notification; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringDef; Loading Loading @@ -62,7 +64,8 @@ public final class Adjustment implements Parcelable { KEY_IMPORTANCE_PROPOSAL, KEY_SENSITIVE_CONTENT, KEY_RANKING_SCORE, KEY_NOT_CONVERSATION KEY_NOT_CONVERSATION, KEY_TYPE }) @Retention(RetentionPolicy.SOURCE) public @interface Keys {} Loading Loading @@ -171,6 +174,59 @@ public final class Adjustment implements Parcelable { @SystemApi public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; /** * Data type: int, the classification type of this notification. The OS may display * notifications differently depending on the type, and may change the alerting level of the * notification. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String KEY_TYPE = "key_type"; /** @hide */ @IntDef(prefix = { "TYPE_" }, value = { TYPE_UNKNOWN, TYPE_OTHER, TYPE_PROMOTION, TYPE_SOCIAL_MEDIA, TYPE_NEWS, TYPE_CONTENT_RECOMMENDATION }) @Retention(RetentionPolicy.SOURCE) public @interface Types {} /** * The type of this notification is unknown. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_UNKNOWN = -1; /** * The type of this notification is not one of ones known to the NotificationAssistantService. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_OTHER = 0; /** * The type of this notification is a promotion/deal. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_PROMOTION = 1; /** * The type of this notification is social media content that isn't a * {@link Notification.Builder#setShortcutId(String) conversation}. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_SOCIAL_MEDIA = 2; /** * The type of this notification is news. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_NEWS = 3; /** * The type of this notification is content recommendation, for example new videos or books the * user may be interested in. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_CONTENT_RECOMMENDATION = 4; /** * Create a notification adjustment. * Loading core/java/android/service/notification/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,11 @@ flag { bug: "305095040" is_fixed_read_only: true } flag { name: "notification_classification" is_exported: true namespace: "systemui" description: "Allows the NAS to classify notifications" bug: "343988084" } No newline at end of file Loading
core/api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -12886,7 +12886,14 @@ package android.service.notification { field public static final String KEY_SENSITIVE_CONTENT = "key_sensitive_content"; field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria"; field public static final String KEY_TEXT_REPLIES = "key_text_replies"; field @FlaggedApi("android.service.notification.notification_classification") public static final String KEY_TYPE = "key_type"; field public static final String KEY_USER_SENTIMENT = "key_user_sentiment"; field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_CONTENT_RECOMMENDATION = 4; // 0x4 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_NEWS = 3; // 0x3 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_OTHER = 0; // 0x0 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_PROMOTION = 1; // 0x1 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_SOCIAL_MEDIA = 2; // 0x2 field @FlaggedApi("android.service.notification.notification_classification") public static final int TYPE_UNKNOWN = -1; // 0xffffffff } public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
core/api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ package android.app { method public void setImportantConversation(boolean); method public void setOriginalImportance(int); method public void setUserVisibleTaskShown(boolean); field @FlaggedApi("android.service.notification.notification_classification") public static final String NEWS_ID = "android.app.news"; field @FlaggedApi("android.service.notification.notification_classification") public static final String PROMOTIONS_ID = "android.app.promotions"; field @FlaggedApi("android.service.notification.notification_classification") public static final String RECS_ID = "android.app.recs"; field @FlaggedApi("android.service.notification.notification_classification") public static final String SOCIAL_MEDIA_ID = "android.app.social"; } public final class NotificationChannelGroup implements android.os.Parcelable { Loading
core/java/android/app/NotificationChannel.java +29 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,35 @@ public final class NotificationChannel implements Parcelable { */ public static final String DEFAULT_CHANNEL_ID = "miscellaneous"; /** * A reserved id for a system channel reserved for promotional notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String PROMOTIONS_ID = "android.app.promotions"; /** * A reserved id for a system channel reserved for non-conversation social media notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String SOCIAL_MEDIA_ID = "android.app.social"; /** * A reserved id for a system channel reserved for news notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String NEWS_ID = "android.app.news"; /** * A reserved id for a system channel reserved for content recommendation notifications. * @hide */ @TestApi @FlaggedApi(android.service.notification.Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String RECS_ID = "android.app.recs"; /** * The formatter used by the system to create an id for notification * channels when it automatically creates conversation channels on behalf of an app. The format Loading
core/java/android/service/notification/Adjustment.java +57 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package android.service.notification; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringDef; Loading Loading @@ -62,7 +64,8 @@ public final class Adjustment implements Parcelable { KEY_IMPORTANCE_PROPOSAL, KEY_SENSITIVE_CONTENT, KEY_RANKING_SCORE, KEY_NOT_CONVERSATION KEY_NOT_CONVERSATION, KEY_TYPE }) @Retention(RetentionPolicy.SOURCE) public @interface Keys {} Loading Loading @@ -171,6 +174,59 @@ public final class Adjustment implements Parcelable { @SystemApi public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; /** * Data type: int, the classification type of this notification. The OS may display * notifications differently depending on the type, and may change the alerting level of the * notification. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final String KEY_TYPE = "key_type"; /** @hide */ @IntDef(prefix = { "TYPE_" }, value = { TYPE_UNKNOWN, TYPE_OTHER, TYPE_PROMOTION, TYPE_SOCIAL_MEDIA, TYPE_NEWS, TYPE_CONTENT_RECOMMENDATION }) @Retention(RetentionPolicy.SOURCE) public @interface Types {} /** * The type of this notification is unknown. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_UNKNOWN = -1; /** * The type of this notification is not one of ones known to the NotificationAssistantService. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_OTHER = 0; /** * The type of this notification is a promotion/deal. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_PROMOTION = 1; /** * The type of this notification is social media content that isn't a * {@link Notification.Builder#setShortcutId(String) conversation}. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_SOCIAL_MEDIA = 2; /** * The type of this notification is news. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_NEWS = 3; /** * The type of this notification is content recommendation, for example new videos or books the * user may be interested in. */ @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION) public static final int TYPE_CONTENT_RECOMMENDATION = 4; /** * Create a notification adjustment. * Loading
core/java/android/service/notification/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,11 @@ flag { bug: "305095040" is_fixed_read_only: true } flag { name: "notification_classification" is_exported: true namespace: "systemui" description: "Allows the NAS to classify notifications" bug: "343988084" } No newline at end of file