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

Commit 157ac50c authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Address API review feedback"

parents adb7cd83 5cb8d5a6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5320,10 +5320,12 @@ package android.app {
    ctor public Notification(android.os.Parcel);
    method public android.app.Notification clone();
    method public int describeContents();
    method @Nullable public android.util.Pair<android.app.RemoteInput,android.app.Notification.Action> findRemoteInputActionPair(boolean);
    method public boolean getAllowSystemGeneratedContextualActions();
    method public int getBadgeIconType();
    method @Nullable public android.app.Notification.BubbleMetadata getBubbleMetadata();
    method public String getChannelId();
    method @NonNull public java.util.List<android.app.Notification.Action> getContextualActions();
    method public String getGroup();
    method public int getGroupAlertBehavior();
    method public android.graphics.drawable.Icon getLargeIcon();
@@ -5719,6 +5721,7 @@ package android.app {
    method public String getDataMimeType();
    method public android.net.Uri getDataUri();
    method public android.os.Bundle getExtras();
    method @NonNull public static java.util.List<android.app.Notification.MessagingStyle.Message> getMessagesFromBundleArray(@Nullable android.os.Parcelable[]);
    method @Deprecated public CharSequence getSender();
    method @Nullable public android.app.Person getSenderPerson();
    method public CharSequence getText();
@@ -5816,6 +5819,7 @@ package android.app {
    method public android.net.Uri getSound();
    method public long[] getVibrationPattern();
    method public boolean hasUserSetImportance();
    method public boolean hasUserSetSound();
    method public void setAllowBubbles(boolean);
    method public void setBypassDnd(boolean);
    method public void setDescription(String);
@@ -41736,6 +41740,7 @@ package android.service.notification {
    method public int getUid();
    method public android.os.UserHandle getUser();
    method @Deprecated public int getUserId();
    method public boolean isAppGroup();
    method public boolean isClearable();
    method public boolean isGroup();
    method public boolean isOngoing();
+0 −10
Original line number Diff line number Diff line
@@ -521,8 +521,6 @@ package android.app {
  }
  public class Notification implements android.os.Parcelable {
    method @Nullable public android.util.Pair<android.app.RemoteInput,android.app.Notification.Action> findRemoteInputActionPair(boolean);
    method @NonNull public java.util.List<android.app.Notification.Action> getContextualActions();
    field public static final String CATEGORY_CAR_EMERGENCY = "car_emergency";
    field public static final String CATEGORY_CAR_INFORMATION = "car_information";
    field public static final String CATEGORY_CAR_WARNING = "car_warning";
@@ -531,10 +529,6 @@ package android.app {
    field public static final int FLAG_AUTOGROUP_SUMMARY = 1024; // 0x400
  }
  public static final class Notification.MessagingStyle.Message {
    method @Nullable public static android.app.Notification.MessagingStyle.Message getMessageFromBundle(@NonNull android.os.Bundle);
  }
  public static final class Notification.TvExtender implements android.app.Notification.Extender {
    ctor public Notification.TvExtender();
    ctor public Notification.TvExtender(android.app.Notification);
@@ -6710,10 +6704,6 @@ package android.service.notification {
    field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.SnoozeCriterion> CREATOR;
  }
  public class StatusBarNotification implements android.os.Parcelable {
    method public boolean isAppGroup();
  }
}
package android.service.oemlock {
+9 −15
Original line number Diff line number Diff line
@@ -3274,11 +3274,8 @@ public class Notification implements Parcelable
     *
     * @param requiresFreeform requires the remoteinput to allow freeform or not.
     * @return the result pair, {@code null} if no result is found.
     *
     * @hide
     */
    @Nullable
    @SystemApi
    public Pair<RemoteInput, Action> findRemoteInputActionPair(boolean requiresFreeform) {
        if (actions == null) {
            return null;
@@ -3301,11 +3298,9 @@ public class Notification implements Parcelable
    }

    /**
     * Returns the actions that are contextual out of the actions in this notification.
     *
     * @hide
     * Returns the actions that are contextual (that is, suggested because of the content of the
     * notification) out of the actions in this notification.
     */
    @SystemApi
    public @NonNull List<Notification.Action> getContextualActions() {
        if (actions == null) return Collections.emptyList();

@@ -7705,11 +7700,11 @@ public class Notification implements Parcelable
            }

            /**
             * @return A list of messages read from the bundles.
             *
             * @hide
             * Returns a list of messages read from the given bundle list, e.g.
             * {@link #EXTRA_MESSAGES} or {@link #EXTRA_HISTORIC_MESSAGES}.
             */
            public static List<Message> getMessagesFromBundleArray(Parcelable[] bundles) {
            @NonNull
            public static List<Message> getMessagesFromBundleArray(@Nullable Parcelable[] bundles) {
                if (bundles == null) {
                    return new ArrayList<>();
                }
@@ -7726,13 +7721,12 @@ public class Notification implements Parcelable
            }

            /**
             * @return The message that is stored in the bundle or null if the message couldn't be
             * resolved.
             *
             * Returns the message that is stored in the bundle (e.g. one of the values in the lists
             * in {@link #EXTRA_MESSAGES} or {@link #EXTRA_HISTORIC_MESSAGES}) or null if the
             * message couldn't be resolved.
             * @hide
             */
            @Nullable
            @SystemApi
            public static Message getMessageFromBundle(@NonNull Bundle bundle) {
                try {
                    if (!bundle.containsKey(KEY_TEXT) || !bundle.containsKey(KEY_TIMESTAMP)) {
+8 −0
Original line number Diff line number Diff line
@@ -709,6 +709,14 @@ public final class NotificationChannel implements Parcelable {
        return (mUserLockedFields & USER_LOCKED_IMPORTANCE) != 0;
    }

    /**
     * Returns whether the user has chosen the sound of this channel.
     * @see #getSound()
     */
    public boolean hasUserSetSound() {
        return (mUserLockedFields & USER_LOCKED_SOUND) != 0;
    }

    /**
     * @hide
     */
+0 −3
Original line number Diff line number Diff line
@@ -170,10 +170,7 @@ public class StatusBarNotification implements Parcelable {

    /**
     * Returns true if application asked that this notification be part of a group.
     *
     * @hide
     */
    @SystemApi
    public boolean isAppGroup() {
        if (getNotification().getGroup() != null || getNotification().getSortKey() != null) {
            return true;
Loading