Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -42669,6 +42669,7 @@ package android.service.notification { field public static final int REASON_APP_CANCEL = 8; // 0x8 field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9 field public static final int REASON_ASSISTANT_CANCEL = 22; // 0x16 field @FlaggedApi("android.service.notification.nm_classification_nls") public static final int REASON_BUNDLE_DISMISSED = 24; // 0x18 field public static final int REASON_CANCEL = 2; // 0x2 field public static final int REASON_CANCEL_ALL = 3; // 0x3 field public static final int REASON_CHANNEL_BANNED = 17; // 0x11 core/java/android/service/notification/NotificationListenerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,12 @@ public abstract class NotificationListenerService extends Service { * will be restored via NotificationListeners#notifyPostedLocked() */ public static final int REASON_LOCKDOWN = 23; @FlaggedApi(Flags.FLAG_NM_CLASSIFICATION_NLS) /** * Notification was canceled because it was in a bundle * (e.g. @link android.app.NotificationChannel#PROMOTIONS_ID) that was dismissed. */ public static final int REASON_BUNDLE_DISMISSED = 24; // If adding a new notification cancellation reason, you must also add handling for it in // NotificationCancelledEvent.fromCancelReason. Loading Loading @@ -313,6 +319,7 @@ public abstract class NotificationListenerService extends Service { REASON_CLEAR_DATA, REASON_ASSISTANT_CANCEL, REASON_LOCKDOWN, REASON_BUNDLE_DISMISSED }) @Retention(RetentionPolicy.SOURCE) public @interface NotificationCancelReason{}; Loading core/java/android/service/notification/flags.aconfig +9 −0 Original line number Diff line number Diff line Loading @@ -89,8 +89,17 @@ flag { bug: "387528442" } # Start: API flags flag { name: "nm_classification_nls" namespace: "systemui" description: "New api for notification_classification_ui" bug: "416144530" is_exported: true } # End: API flags # Start: Flags that have been cleaned up in code but need to remain for CTS Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ interface IStatusBarService int uid, int initialPid, String message, int userId); void onClearAllNotifications(int userId); void onNotificationClear(String pkg, int userId, String key, int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv); int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv, boolean fromBundle); void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys, in NotificationVisibility[] noLongerVisibleKeys); void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded, in int notificationLocation); Loading packages/SystemUI/multivalentTests/src/com/android/systemui/people/widget/LaunchConversationActivityTest.java +7 −6 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -172,7 +172,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -183,7 +183,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -201,7 +201,8 @@ public class LaunchConversationActivityTest extends SysuiTestCase { // Clear the notification for bubbles. FakeExecutor.exhaustExecutors(mBgExecutor); verify(mIStatusBarService, times(1)).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), mNotificationVisibilityCaptor.capture()); anyInt(), any(), anyInt(), anyInt(), mNotificationVisibilityCaptor.capture(), anyBoolean()); // Do not select the bubble. verify(mBubblesManager, never()).expandStackAndSelectBubble(any(Bubble.class)); verify(mBubblesManager, never()).expandStackAndSelectBubble(any(NotificationEntry.class)); Loading @@ -226,7 +227,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { verify(mCommandQueue).removeCallback(any()); // Don't clear the notification for bubbles. verify(mIStatusBarService, never()).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), any()); anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); // Select the bubble. verify(mBubblesManager, times(1)).getBubbleWithShortcutId(any()); verify(mBubblesManager, times(1)).expandStackAndSelectBubble(eq(mNotifEntryCanBubble)); Loading @@ -247,7 +248,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { verify(mCommandQueue).removeCallback(any()); // Don't clear the notification for bubbles. verify(mIStatusBarService, never()).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), any()); anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); // Do not select the bubble. verify(mBubblesManager, never()).expandStackAndSelectBubble(any(Bubble.class)); verify(mBubblesManager, never()).expandStackAndSelectBubble(any(NotificationEntry.class)); Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -42669,6 +42669,7 @@ package android.service.notification { field public static final int REASON_APP_CANCEL = 8; // 0x8 field public static final int REASON_APP_CANCEL_ALL = 9; // 0x9 field public static final int REASON_ASSISTANT_CANCEL = 22; // 0x16 field @FlaggedApi("android.service.notification.nm_classification_nls") public static final int REASON_BUNDLE_DISMISSED = 24; // 0x18 field public static final int REASON_CANCEL = 2; // 0x2 field public static final int REASON_CANCEL_ALL = 3; // 0x3 field public static final int REASON_CHANNEL_BANNED = 17; // 0x11
core/java/android/service/notification/NotificationListenerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,12 @@ public abstract class NotificationListenerService extends Service { * will be restored via NotificationListeners#notifyPostedLocked() */ public static final int REASON_LOCKDOWN = 23; @FlaggedApi(Flags.FLAG_NM_CLASSIFICATION_NLS) /** * Notification was canceled because it was in a bundle * (e.g. @link android.app.NotificationChannel#PROMOTIONS_ID) that was dismissed. */ public static final int REASON_BUNDLE_DISMISSED = 24; // If adding a new notification cancellation reason, you must also add handling for it in // NotificationCancelledEvent.fromCancelReason. Loading Loading @@ -313,6 +319,7 @@ public abstract class NotificationListenerService extends Service { REASON_CLEAR_DATA, REASON_ASSISTANT_CANCEL, REASON_LOCKDOWN, REASON_BUNDLE_DISMISSED }) @Retention(RetentionPolicy.SOURCE) public @interface NotificationCancelReason{}; Loading
core/java/android/service/notification/flags.aconfig +9 −0 Original line number Diff line number Diff line Loading @@ -89,8 +89,17 @@ flag { bug: "387528442" } # Start: API flags flag { name: "nm_classification_nls" namespace: "systemui" description: "New api for notification_classification_ui" bug: "416144530" is_exported: true } # End: API flags # Start: Flags that have been cleaned up in code but need to remain for CTS Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ interface IStatusBarService int uid, int initialPid, String message, int userId); void onClearAllNotifications(int userId); void onNotificationClear(String pkg, int userId, String key, int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv); int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv, boolean fromBundle); void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys, in NotificationVisibility[] noLongerVisibleKeys); void onNotificationExpansionChanged(in String key, in boolean userAction, in boolean expanded, in int notificationLocation); Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/people/widget/LaunchConversationActivityTest.java +7 −6 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -172,7 +172,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -183,7 +183,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { mActivity.onCreate(new Bundle()); verify(mIStatusBarService, never()).onNotificationClear( any(), anyInt(), any(), anyInt(), anyInt(), any()); any(), anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); } @Test Loading @@ -201,7 +201,8 @@ public class LaunchConversationActivityTest extends SysuiTestCase { // Clear the notification for bubbles. FakeExecutor.exhaustExecutors(mBgExecutor); verify(mIStatusBarService, times(1)).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), mNotificationVisibilityCaptor.capture()); anyInt(), any(), anyInt(), anyInt(), mNotificationVisibilityCaptor.capture(), anyBoolean()); // Do not select the bubble. verify(mBubblesManager, never()).expandStackAndSelectBubble(any(Bubble.class)); verify(mBubblesManager, never()).expandStackAndSelectBubble(any(NotificationEntry.class)); Loading @@ -226,7 +227,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { verify(mCommandQueue).removeCallback(any()); // Don't clear the notification for bubbles. verify(mIStatusBarService, never()).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), any()); anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); // Select the bubble. verify(mBubblesManager, times(1)).getBubbleWithShortcutId(any()); verify(mBubblesManager, times(1)).expandStackAndSelectBubble(eq(mNotifEntryCanBubble)); Loading @@ -247,7 +248,7 @@ public class LaunchConversationActivityTest extends SysuiTestCase { verify(mCommandQueue).removeCallback(any()); // Don't clear the notification for bubbles. verify(mIStatusBarService, never()).onNotificationClear(any(), anyInt(), any(), anyInt(), anyInt(), any()); anyInt(), any(), anyInt(), anyInt(), any(), anyBoolean()); // Do not select the bubble. verify(mBubblesManager, never()).expandStackAndSelectBubble(any(Bubble.class)); verify(mBubblesManager, never()).expandStackAndSelectBubble(any(NotificationEntry.class)); Loading