From 384e8af6b4b07bb4bfda171a1c04387b76d2c524 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Thu, 20 Oct 2022 14:53:03 -0400 Subject: [PATCH] Update category to action Test: settings tests, launch test app Fixes: 254339351 Change-Id: Id7f0c15ce1ac35edf4f98319c7b3f8580c002e33 --- core/api/current.txt | 2 +- .../service/notification/NotificationListenerService.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index 8056818a44c0b..be30360609053 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -39320,6 +39320,7 @@ package android.service.notification { method public final void setNotificationsShown(String[]); method public final void snoozeNotification(String, long); method public final void updateNotificationChannel(@NonNull String, @NonNull android.os.UserHandle, @NonNull android.app.NotificationChannel); + field public static final String ACTION_SETTINGS_HOME = "android.service.notification.action.SETTINGS_HOME"; field public static final int FLAG_FILTER_TYPE_ALERTING = 2; // 0x2 field public static final int FLAG_FILTER_TYPE_CONVERSATIONS = 1; // 0x1 field public static final int FLAG_FILTER_TYPE_ONGOING = 8; // 0x8 @@ -39327,7 +39328,6 @@ package android.service.notification { field public static final int HINT_HOST_DISABLE_CALL_EFFECTS = 4; // 0x4 field public static final int HINT_HOST_DISABLE_EFFECTS = 1; // 0x1 field public static final int HINT_HOST_DISABLE_NOTIFICATION_EFFECTS = 2; // 0x2 - field public static final String INTENT_CATEGORY_SETTINGS_HOME = "android.service.notification.category.SETTINGS_HOME"; field public static final int INTERRUPTION_FILTER_ALARMS = 4; // 0x4 field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index bd4a4957775e6..cfc79e4fef66a 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -392,13 +392,13 @@ public abstract class NotificationListenerService extends Service { public static final int NOTIFICATION_CHANNEL_OR_GROUP_DELETED = 3; /** - * An optional activity intent category that shows additional settings for what notifications + * An optional activity intent action that shows additional settings for what notifications * should be processed by this notification listener service. If defined, the OS may link to * this activity from the system notification listener service filter settings page. */ - @SdkConstant(SdkConstant.SdkConstantType.INTENT_CATEGORY) - public static final String INTENT_CATEGORY_SETTINGS_HOME = - "android.service.notification.category.SETTINGS_HOME"; + @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_SETTINGS_HOME = + "android.service.notification.action.SETTINGS_HOME"; private final Object mLock = new Object();