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

Commit 79f0277f authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Fix API errors

APIs that were @SystemApi in the last release cannot be changed.

Test: atest CtsSystemApiSignatureTestCases
Bug: 124209375
Change-Id: I631b7dea09e723f509581f82a85da99344b42a09
parent fc6e5674
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -41546,6 +41546,7 @@ package android.service.notification {
    field public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR;
    field 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_CONTEXTUAL_ACTIONS = "key_contextual_actions";
    field public static final String KEY_IMPORTANCE = "key_importance";
    field public static final String KEY_IMPORTANCE = "key_importance";
    field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
    field public static final String KEY_TEXT_REPLIES = "key_text_replies";
    field public static final String KEY_TEXT_REPLIES = "key_text_replies";
    field public static final String KEY_USER_SENTIMENT = "key_user_sentiment";
    field public static final String KEY_USER_SENTIMENT = "key_user_sentiment";
  }
  }
@@ -41603,12 +41604,14 @@ package android.service.notification {
    method public void onActionInvoked(@NonNull String, @NonNull android.app.Notification.Action, int);
    method public void onActionInvoked(@NonNull String, @NonNull android.app.Notification.Action, int);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onNotificationDirectReplied(@NonNull String);
    method public void onNotificationDirectReplied(@NonNull String);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
    method public abstract android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, android.app.NotificationChannel);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, android.app.NotificationChannel);
    method public void onNotificationExpansionChanged(@NonNull String, boolean, boolean);
    method public void onNotificationExpansionChanged(@NonNull String, boolean, boolean);
    method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap, android.service.notification.NotificationStats, int);
    method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap, android.service.notification.NotificationStats, int);
    method public abstract void onNotificationSnoozedUntilContext(android.service.notification.StatusBarNotification, String);
    method public void onNotificationsSeen(java.util.List<java.lang.String>);
    method public void onNotificationsSeen(java.util.List<java.lang.String>);
    method public void onSuggestedReplySent(@NonNull String, @NonNull CharSequence, int);
    method public void onSuggestedReplySent(@NonNull String, @NonNull CharSequence, int);
    method public final void unsnoozeNotification(String);
    field public static final String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
    field public static final String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService";
    field public static final int SOURCE_FROM_APP = 0; // 0x0
    field public static final int SOURCE_FROM_APP = 0; // 0x0
    field public static final int SOURCE_FROM_ASSISTANT = 1; // 0x1
    field public static final int SOURCE_FROM_ASSISTANT = 1; // 0x1
+9 −0
Original line number Original line Diff line number Diff line
@@ -6500,6 +6500,15 @@ package android.service.euicc {
package android.service.notification {
package android.service.notification {
  public final class Adjustment implements android.os.Parcelable {
    ctor protected Adjustment(android.os.Parcel);
    field public static final String KEY_PEOPLE = "key_people";
  }
  public final class NotificationStats implements android.os.Parcelable {
    ctor protected NotificationStats(android.os.Parcel);
  }
  public final class SnoozeCriterion implements android.os.Parcelable {
  public final class SnoozeCriterion implements android.os.Parcelable {
    ctor public SnoozeCriterion(String, CharSequence, CharSequence);
    ctor public SnoozeCriterion(String, CharSequence, CharSequence);
    ctor protected SnoozeCriterion(android.os.Parcel);
    ctor protected SnoozeCriterion(android.os.Parcel);
+7 −2
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
 */
 */
package android.service.notification;
package android.service.notification;


import android.annotation.SystemApi;
import android.app.Notification;
import android.app.Notification;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcel;
@@ -36,13 +37,13 @@ public final class Adjustment implements Parcelable {
     * See {@link android.app.Notification.Builder#addPerson(String)}.
     * See {@link android.app.Notification.Builder#addPerson(String)}.
     * @hide
     * @hide
     */
     */
    @SystemApi
    public static final String KEY_PEOPLE = "key_people";
    public static final String KEY_PEOPLE = "key_people";
    /**
    /**
     * Parcelable {@code ArrayList} of {@link SnoozeCriterion}. These criteria may be visible to
     * Parcelable {@code ArrayList} of {@link SnoozeCriterion}. These criteria may be visible to
     * users. If a user chooses to snooze a notification until one of these criterion, the
     * users. If a user chooses to snooze a notification until one of these criterion, the
     * assistant will be notified via
     * assistant will be notified via
     * {@link NotificationAssistantService#onNotificationSnoozedUntilContext}.
     * {@link NotificationAssistantService#onNotificationSnoozedUntilContext}.
     * @hide
     */
     */
    public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
    public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
    /**
    /**
@@ -111,7 +112,11 @@ public final class Adjustment implements Parcelable {
        mUser = user;
        mUser = user;
    }
    }


    private Adjustment(Parcel in) {
    /**
     * @hide
     */
    @SystemApi
    protected Adjustment(Parcel in) {
        if (in.readInt() == 1) {
        if (in.readInt() == 1) {
            mPackage = in.readString();
            mPackage = in.readString();
        } else {
        } else {
+7 −7
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.app.Notification;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationChannel;
import android.app.admin.DevicePolicyManager;
import android.app.admin.DevicePolicyManager;
@@ -103,7 +104,6 @@ public abstract class NotificationAssistantService extends NotificationListenerS
     *
     *
     * @param sbn the notification to snooze
     * @param sbn the notification to snooze
     * @param snoozeCriterionId the {@link SnoozeCriterion#getId()} representing a device context.
     * @param snoozeCriterionId the {@link SnoozeCriterion#getId()} representing a device context.
     * @hide
     */
     */
    abstract public void onNotificationSnoozedUntilContext(StatusBarNotification sbn,
    abstract public void onNotificationSnoozedUntilContext(StatusBarNotification sbn,
            String snoozeCriterionId);
            String snoozeCriterionId);
@@ -111,12 +111,13 @@ public abstract class NotificationAssistantService extends NotificationListenerS
    /**
    /**
     * A notification was posted by an app. Called before post.
     * A notification was posted by an app. Called before post.
     *
     *
     * <p>Note: this method is only called if you don't override
     * {@link #onNotificationEnqueued(StatusBarNotification, NotificationChannel)}.</p>
     *
     * @param sbn the new notification
     * @param sbn the new notification
     * @return an adjustment or null to take no action, within 100ms.
     * @return an adjustment or null to take no action, within 100ms.
     */
     */
    public Adjustment onNotificationEnqueued(StatusBarNotification sbn) {
    abstract public Adjustment onNotificationEnqueued(StatusBarNotification sbn);
        return null;
    }


    /**
    /**
     * A notification was posted by an app. Called before post.
     * A notification was posted by an app. Called before post.
@@ -240,12 +241,11 @@ public abstract class NotificationAssistantService extends NotificationListenerS
    /**
    /**
     * Inform the notification manager about un-snoozing a specific notification.
     * Inform the notification manager about un-snoozing a specific notification.
     * <p>
     * <p>
     * This should only be used for notifications snoozed by this listener using
     * This should only be used for notifications snoozed because of a contextual snooze suggestion
     * {@link #snoozeNotification(String, String)}. Once un-snoozed, you will get a
     * you provided via {@link Adjustment#KEY_SNOOZE_CRITERIA}. Once un-snoozed, you will get a
     * {@link #onNotificationPosted(StatusBarNotification, RankingMap)} callback for the
     * {@link #onNotificationPosted(StatusBarNotification, RankingMap)} callback for the
     * notification.
     * notification.
     * @param key The key of the notification to snooze
     * @param key The key of the notification to snooze
     * @hide
     */
     */
    public final void unsnoozeNotification(String key) {
    public final void unsnoozeNotification(String key) {
        if (!isBound()) return;
        if (!isBound()) return;
+6 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
package android.service.notification;
package android.service.notification;


import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.app.RemoteInput;
import android.app.RemoteInput;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
@@ -98,7 +99,11 @@ public final class NotificationStats implements Parcelable {
    public NotificationStats() {
    public NotificationStats() {
    }
    }


    private NotificationStats(Parcel in) {
    /**
     * @hide
     */
    @SystemApi
    protected NotificationStats(Parcel in) {
        mSeen = in.readByte() != 0;
        mSeen = in.readByte() != 0;
        mExpanded = in.readByte() != 0;
        mExpanded = in.readByte() != 0;
        mDirectReplied = in.readByte() != 0;
        mDirectReplied = in.readByte() != 0;
Loading