Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a32cb9f4 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Add constant for action for NAS to gather feedback

Test: none in particular; just the standard tests for making sure
API constants are reserved
Flag: android.service.notification.notification_classification
Fixes: 369190161

Change-Id: I5a6f9114a119f7354c785ec7337de1c58fbcfcef
parent 9935efc4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13020,6 +13020,8 @@ package android.service.notification {
    method public void onSuggestedReplySent(@NonNull String, @NonNull CharSequence, int);
    method public final void unsnoozeNotification(@NonNull String);
    field public static final String ACTION_NOTIFICATION_ASSISTANT_DETAIL_SETTINGS = "android.service.notification.action.NOTIFICATION_ASSISTANT_DETAIL_SETTINGS";
    field @FlaggedApi("android.service.notification.notification_classification") public static final String ACTION_NOTIFICATION_ASSISTANT_FEEDBACK_SETTINGS = "android.service.notification.action.NOTIFICATION_ASSISTANT_FEEDBACK_SETTINGS";
    field @FlaggedApi("android.service.notification.notification_classification") public static final String EXTRA_NOTIFICATION_KEY = "android.service.notification.extra.NOTIFICATION_KEY";
    field public static final String FEEDBACK_RATING = "feedback.rating";
    field public static final String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
    field public static final int SOURCE_FROM_APP = 0; // 0x0
+29 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.service.notification;

import static java.lang.annotation.RetentionPolicy.SOURCE;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -90,10 +91,11 @@ public abstract class NotificationAssistantService extends NotificationListenerS
            = "android.service.notification.NotificationAssistantService";

    /**
     * Activity Action: Show notification assistant detail setting page in NAS app.
     * Activity Action: Show notification assistant detail setting page in the NAS app.
     * <p>
     * In some cases, a matching Activity may not exist, so ensure you
     * safeguard against this.
     * To be implemented by the NAS to offer users additional customization of intelligence
     * features. If the action is not implemented, the OS will not provide a link to it in the
     * Settings UI.
     * <p>
     * Input: Nothing.
     * <p>
@@ -103,6 +105,30 @@ public abstract class NotificationAssistantService extends NotificationListenerS
    public static final String ACTION_NOTIFICATION_ASSISTANT_DETAIL_SETTINGS =
            "android.service.notification.action.NOTIFICATION_ASSISTANT_DETAIL_SETTINGS";

    /**
     * Activity Action: Open notification assistant feedback page in the NAS app.
     * <p>
     * If the NAS does not implement this page, the OS will not show any feedback calls to action in
     * the UI.
     * <p>
     * Input: {@link #EXTRA_NOTIFICATION_KEY}, the {@link StatusBarNotification#getKey()} of the
     * notification the user wants to file feedback for.
     * <p>
     * Output: Nothing.
     */
    @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION)
    @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NOTIFICATION_ASSISTANT_FEEDBACK_SETTINGS =
            "android.service.notification.action.NOTIFICATION_ASSISTANT_FEEDBACK_SETTINGS";

    /**
     * A string extra containing the key of the notification that the user triggered feedback for.
     *
     * Extra for {@link #ACTION_NOTIFICATION_ASSISTANT_FEEDBACK_SETTINGS}.
     */
    @FlaggedApi(Flags.FLAG_NOTIFICATION_CLASSIFICATION)
    public static final String EXTRA_NOTIFICATION_KEY
            = "android.service.notification.extra.NOTIFICATION_KEY";

    /**
     * Data type: int, the feedback rating score provided by user. The score can be any integer