diff --git a/api/current.txt b/api/current.txt index 223e9bd421a9b..41e0daaaaef42 100644 --- a/api/current.txt +++ b/api/current.txt @@ -38962,6 +38962,7 @@ package android.provider { field public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; field public static final String ACTION_NIGHT_DISPLAY_SETTINGS = "android.settings.NIGHT_DISPLAY_SETTINGS"; field public static final String ACTION_NOTIFICATION_ASSISTANT_SETTINGS = "android.settings.NOTIFICATION_ASSISTANT_SETTINGS"; + field public static final String ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS = "android.settings.NOTIFICATION_LISTENER_DETAIL_SETTINGS"; field public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; field public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"; field public static final String ACTION_PRINT_SETTINGS = "android.settings.ACTION_PRINT_SETTINGS"; @@ -39001,6 +39002,7 @@ package android.provider { field public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = "android.settings.extra.do_not_disturb_mode_enabled"; field public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = "android.settings.extra.do_not_disturb_mode_minutes"; field public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; + field public static final String EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME = "android.provider.extra.NOTIFICATION_LISTENER_COMPONENT_NAME"; field public static final String EXTRA_SUB_ID = "android.provider.extra.SUB_ID"; field public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = "android.intent.category.USAGE_ACCESS_CONFIG"; field public static final String METADATA_USAGE_ACCESS_REASON = "android.settings.metadata.USAGE_ACCESS_REASON"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 1b1e8b4659e85..22042a628ded8 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1261,6 +1261,33 @@ public final class Settings { public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; + /** + * Activity Action: Show notification listener permission settings page for app. + *
+ * Users can grant and deny access to notifications for a {@link ComponentName} from here. + * See + * {@link android.app.NotificationManager#isNotificationListenerAccessGranted(ComponentName)} + * for more details. + *
+ * Input: The extra {@link #EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME} containing the name + * of the component to grant or revoke notification listener access to. + *
+ * Output: Nothing. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS = + "android.settings.NOTIFICATION_LISTENER_DETAIL_SETTINGS"; + + /** + * Activity Extra: What component name to show the notification listener permission + * page for. + *
+ * A string extra containing a {@link ComponentName}. This must be passed as an extra field to + * {@link #ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS}. + */ + public static final String EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME = + "android.provider.extra.NOTIFICATION_LISTENER_COMPONENT_NAME"; + /** * Activity Action: Show Do Not Disturb access settings. *
diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto index 97dae599f5c24..9e0c35a3b3bcc 100644 --- a/core/proto/android/app/settings_enums.proto +++ b/core/proto/android/app/settings_enums.proto @@ -2436,4 +2436,9 @@ enum PageId { // OS: R INSTALL_CERTIFICATE_FROM_STORAGE = 1803; + // OPEN: Settings > Apps and notifications > Special app access > notification access > + // an app + // CATEGORY: SETTINGS + // OS: R + NOTIFICATION_ACCESS_DETAIL = 1804; }