Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -10129,6 +10129,7 @@ package android.service.notification { field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR; field public static final String KEY_CONTEXTUAL_ACTIONS = "key_contextual_actions"; field public static final String KEY_IMPORTANCE = "key_importance"; field public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; field public static final String KEY_PEOPLE = "key_people"; field public static final String KEY_RANKING_SCORE = "key_ranking_score"; field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria"; core/java/android/service/notification/Adjustment.java +7 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,13 @@ public final class Adjustment implements Parcelable { */ public static final String KEY_RANKING_SCORE = "key_ranking_score"; /** * Data type: boolean, when true it suggests this is NOT a conversation notification. * @hide */ @SystemApi public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; /** * Create a notification adjustment. * Loading core/java/android/service/notification/NotificationListenerService.java +17 −3 Original line number Diff line number Diff line Loading @@ -1539,6 +1539,7 @@ public abstract class NotificationListenerService extends Service { private ArrayList<CharSequence> mSmartReplies; private boolean mCanBubble; private boolean mVisuallyInterruptive; private boolean mIsConversation; private static final int PARCEL_VERSION = 2; Loading Loading @@ -1571,6 +1572,7 @@ public abstract class NotificationListenerService extends Service { out.writeCharSequenceList(mSmartReplies); out.writeBoolean(mCanBubble); out.writeBoolean(mVisuallyInterruptive); out.writeBoolean(mIsConversation); } /** @hide */ Loading Loading @@ -1604,6 +1606,7 @@ public abstract class NotificationListenerService extends Service { mSmartReplies = in.readCharSequenceList(); mCanBubble = in.readBoolean(); mVisuallyInterruptive = in.readBoolean(); mIsConversation = in.readBoolean(); } Loading Loading @@ -1800,6 +1803,14 @@ public abstract class NotificationListenerService extends Service { return mNoisy; } /** * Returns whether this notification is a conversation notification. * @hide */ public boolean isConversation() { return mIsConversation; } /** * @hide */ Loading @@ -1812,7 +1823,7 @@ public abstract class NotificationListenerService extends Service { int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies, boolean canBubble, boolean visuallyInterruptive) { boolean visuallyInterruptive, boolean isConversation) { mKey = key; mRank = rank; mIsAmbient = importance < NotificationManager.IMPORTANCE_LOW; Loading @@ -1834,6 +1845,7 @@ public abstract class NotificationListenerService extends Service { mSmartReplies = smartReplies; mCanBubble = canBubble; mVisuallyInterruptive = visuallyInterruptive; mIsConversation = isConversation; } /** Loading @@ -1859,7 +1871,8 @@ public abstract class NotificationListenerService extends Service { other.mSmartActions, other.mSmartReplies, other.mCanBubble, other.mVisuallyInterruptive); other.mVisuallyInterruptive, other.mIsConversation); } /** Loading Loading @@ -1912,7 +1925,8 @@ public abstract class NotificationListenerService extends Service { == (other.mSmartActions == null ? 0 : other.mSmartActions.size())) && Objects.equals(mSmartReplies, other.mSmartReplies) && Objects.equals(mCanBubble, other.mCanBubble) && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive); && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive) && Objects.equals(mIsConversation, other.mIsConversation); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class NotificationListener extends NotificationListenerWithPlugins { new ArrayList<>(), new ArrayList<>(), false, false, false ); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRankingManager.kt +1 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.notification.collection import android.app.NotificationChannel import android.app.NotificationManager.IMPORTANCE_HIGH import android.app.NotificationManager.IMPORTANCE_MIN import android.service.notification.NotificationListenerService.Ranking Loading Loading @@ -192,9 +191,7 @@ open class NotificationRankingManager @Inject constructor( } private fun NotificationEntry.isPeopleNotification() = sbn.isPeopleNotification(channel) private fun StatusBarNotification.isPeopleNotification(channel: NotificationChannel) = peopleNotificationIdentifier.isPeopleNotification(this, channel) peopleNotificationIdentifier.isPeopleNotification(sbn, ranking) private fun NotificationEntry.isHighPriority() = highPriorityProvider.isHighPriority(this) Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -10129,6 +10129,7 @@ package android.service.notification { field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR; field public static final String KEY_CONTEXTUAL_ACTIONS = "key_contextual_actions"; field public static final String KEY_IMPORTANCE = "key_importance"; field public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; field public static final String KEY_PEOPLE = "key_people"; field public static final String KEY_RANKING_SCORE = "key_ranking_score"; field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
core/java/android/service/notification/Adjustment.java +7 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,13 @@ public final class Adjustment implements Parcelable { */ public static final String KEY_RANKING_SCORE = "key_ranking_score"; /** * Data type: boolean, when true it suggests this is NOT a conversation notification. * @hide */ @SystemApi public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; /** * Create a notification adjustment. * Loading
core/java/android/service/notification/NotificationListenerService.java +17 −3 Original line number Diff line number Diff line Loading @@ -1539,6 +1539,7 @@ public abstract class NotificationListenerService extends Service { private ArrayList<CharSequence> mSmartReplies; private boolean mCanBubble; private boolean mVisuallyInterruptive; private boolean mIsConversation; private static final int PARCEL_VERSION = 2; Loading Loading @@ -1571,6 +1572,7 @@ public abstract class NotificationListenerService extends Service { out.writeCharSequenceList(mSmartReplies); out.writeBoolean(mCanBubble); out.writeBoolean(mVisuallyInterruptive); out.writeBoolean(mIsConversation); } /** @hide */ Loading Loading @@ -1604,6 +1606,7 @@ public abstract class NotificationListenerService extends Service { mSmartReplies = in.readCharSequenceList(); mCanBubble = in.readBoolean(); mVisuallyInterruptive = in.readBoolean(); mIsConversation = in.readBoolean(); } Loading Loading @@ -1800,6 +1803,14 @@ public abstract class NotificationListenerService extends Service { return mNoisy; } /** * Returns whether this notification is a conversation notification. * @hide */ public boolean isConversation() { return mIsConversation; } /** * @hide */ Loading @@ -1812,7 +1823,7 @@ public abstract class NotificationListenerService extends Service { int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies, boolean canBubble, boolean visuallyInterruptive) { boolean visuallyInterruptive, boolean isConversation) { mKey = key; mRank = rank; mIsAmbient = importance < NotificationManager.IMPORTANCE_LOW; Loading @@ -1834,6 +1845,7 @@ public abstract class NotificationListenerService extends Service { mSmartReplies = smartReplies; mCanBubble = canBubble; mVisuallyInterruptive = visuallyInterruptive; mIsConversation = isConversation; } /** Loading @@ -1859,7 +1871,8 @@ public abstract class NotificationListenerService extends Service { other.mSmartActions, other.mSmartReplies, other.mCanBubble, other.mVisuallyInterruptive); other.mVisuallyInterruptive, other.mIsConversation); } /** Loading Loading @@ -1912,7 +1925,8 @@ public abstract class NotificationListenerService extends Service { == (other.mSmartActions == null ? 0 : other.mSmartActions.size())) && Objects.equals(mSmartReplies, other.mSmartReplies) && Objects.equals(mCanBubble, other.mCanBubble) && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive); && Objects.equals(mVisuallyInterruptive, other.mVisuallyInterruptive) && Objects.equals(mIsConversation, other.mIsConversation); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java +1 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,7 @@ public class NotificationListener extends NotificationListenerWithPlugins { new ArrayList<>(), new ArrayList<>(), false, false, false ); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRankingManager.kt +1 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.notification.collection import android.app.NotificationChannel import android.app.NotificationManager.IMPORTANCE_HIGH import android.app.NotificationManager.IMPORTANCE_MIN import android.service.notification.NotificationListenerService.Ranking Loading Loading @@ -192,9 +191,7 @@ open class NotificationRankingManager @Inject constructor( } private fun NotificationEntry.isPeopleNotification() = sbn.isPeopleNotification(channel) private fun StatusBarNotification.isPeopleNotification(channel: NotificationChannel) = peopleNotificationIdentifier.isPeopleNotification(this, channel) peopleNotificationIdentifier.isPeopleNotification(sbn, ranking) private fun NotificationEntry.isHighPriority() = highPriorityProvider.isHighPriority(this) Loading