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

Commit f84467e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Api updates" into oc-dev

parents 3ab258c9 bad42976
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5125,6 +5125,7 @@ package android.app {
    method public int describeContents();
    method public int getBadgeIconType();
    method public java.lang.String getChannel();
    method public java.lang.String getChannelId();
    method public java.lang.String getGroup();
    method public int getGroupAlertBehavior();
    method public android.graphics.drawable.Icon getLargeIcon();
@@ -5133,6 +5134,7 @@ package android.app {
    method public android.graphics.drawable.Icon getSmallIcon();
    method public java.lang.String getSortKey();
    method public long getTimeout();
    method public long getTimeoutAfter();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
    field public static final int BADGE_ICON_LARGE = 2; // 0x2
@@ -5335,6 +5337,7 @@ package android.app {
    method public android.app.Notification.Builder setBadgeIconType(int);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChannel(java.lang.String);
    method public android.app.Notification.Builder setChannelId(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public android.app.Notification.Builder setColorized(boolean);
@@ -5379,6 +5382,7 @@ package android.app {
    method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
    method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
    method public android.app.Notification.Builder setTimeout(long);
    method public android.app.Notification.Builder setTimeoutAfter(long);
    method public android.app.Notification.Builder setUsesChronometer(boolean);
    method public deprecated android.app.Notification.Builder setVibrate(long[]);
    method public android.app.Notification.Builder setVisibility(int);
@@ -5540,7 +5544,6 @@ package android.app {
  public final class NotificationChannel implements android.os.Parcelable {
    ctor public NotificationChannel(java.lang.String, java.lang.CharSequence, int);
    ctor protected NotificationChannel(android.os.Parcel);
    method public boolean canBypassDnd();
    method public boolean canShowBadge();
    method public int describeContents();
@@ -5575,7 +5578,6 @@ package android.app {
  public final class NotificationChannelGroup implements android.os.Parcelable {
    ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
    ctor protected NotificationChannelGroup(android.os.Parcel);
    method public android.app.NotificationChannelGroup clone();
    method public int describeContents();
    method public java.util.List<android.app.NotificationChannel> getChannels();
+6 −2
Original line number Diff line number Diff line
@@ -5305,6 +5305,7 @@ package android.app {
    method public int describeContents();
    method public int getBadgeIconType();
    method public java.lang.String getChannel();
    method public java.lang.String getChannelId();
    method public java.lang.String getGroup();
    method public int getGroupAlertBehavior();
    method public android.graphics.drawable.Icon getLargeIcon();
@@ -5314,6 +5315,7 @@ package android.app {
    method public android.graphics.drawable.Icon getSmallIcon();
    method public java.lang.String getSortKey();
    method public long getTimeout();
    method public long getTimeoutAfter();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
    field public static final int BADGE_ICON_LARGE = 2; // 0x2
@@ -5519,6 +5521,7 @@ package android.app {
    method public android.app.Notification.Builder setBadgeIconType(int);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChannel(java.lang.String);
    method public android.app.Notification.Builder setChannelId(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public android.app.Notification.Builder setColorized(boolean);
@@ -5563,6 +5566,7 @@ package android.app {
    method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
    method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
    method public android.app.Notification.Builder setTimeout(long);
    method public android.app.Notification.Builder setTimeoutAfter(long);
    method public android.app.Notification.Builder setUsesChronometer(boolean);
    method public deprecated android.app.Notification.Builder setVibrate(long[]);
    method public android.app.Notification.Builder setVisibility(int);
@@ -5667,10 +5671,12 @@ package android.app {
    ctor public Notification.TvExtender(android.app.Notification);
    method public android.app.Notification.Builder extend(android.app.Notification.Builder);
    method public java.lang.String getChannel();
    method public java.lang.String getChannelId();
    method public android.app.PendingIntent getContentIntent();
    method public android.app.PendingIntent getDeleteIntent();
    method public boolean isAvailableOnTv();
    method public android.app.Notification.TvExtender setChannel(java.lang.String);
    method public android.app.Notification.TvExtender setChannelId(java.lang.String);
    method public android.app.Notification.TvExtender setContentIntent(android.app.PendingIntent);
    method public android.app.Notification.TvExtender setDeleteIntent(android.app.PendingIntent);
  }
@@ -5737,7 +5743,6 @@ package android.app {
  public final class NotificationChannel implements android.os.Parcelable {
    ctor public NotificationChannel(java.lang.String, java.lang.CharSequence, int);
    ctor protected NotificationChannel(android.os.Parcel);
    method public boolean canBypassDnd();
    method public boolean canShowBadge();
    method public int describeContents();
@@ -5777,7 +5782,6 @@ package android.app {
  public final class NotificationChannelGroup implements android.os.Parcelable {
    ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
    ctor protected NotificationChannelGroup(android.os.Parcel);
    method public android.app.NotificationChannelGroup clone();
    method public int describeContents();
    method public java.util.List<android.app.NotificationChannel> getChannels();
+4 −2
Original line number Diff line number Diff line
@@ -5138,6 +5138,7 @@ package android.app {
    method public int describeContents();
    method public int getBadgeIconType();
    method public java.lang.String getChannel();
    method public java.lang.String getChannelId();
    method public java.lang.String getGroup();
    method public int getGroupAlertBehavior();
    method public android.graphics.drawable.Icon getLargeIcon();
@@ -5146,6 +5147,7 @@ package android.app {
    method public android.graphics.drawable.Icon getSmallIcon();
    method public java.lang.String getSortKey();
    method public long getTimeout();
    method public long getTimeoutAfter();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT;
    field public static final int BADGE_ICON_LARGE = 2; // 0x2
@@ -5348,6 +5350,7 @@ package android.app {
    method public android.app.Notification.Builder setBadgeIconType(int);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChannel(java.lang.String);
    method public android.app.Notification.Builder setChannelId(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public android.app.Notification.Builder setColorized(boolean);
@@ -5392,6 +5395,7 @@ package android.app {
    method public android.app.Notification.Builder setTicker(java.lang.CharSequence);
    method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews);
    method public android.app.Notification.Builder setTimeout(long);
    method public android.app.Notification.Builder setTimeoutAfter(long);
    method public android.app.Notification.Builder setUsesChronometer(boolean);
    method public deprecated android.app.Notification.Builder setVibrate(long[]);
    method public android.app.Notification.Builder setVisibility(int);
@@ -5553,7 +5557,6 @@ package android.app {
  public final class NotificationChannel implements android.os.Parcelable {
    ctor public NotificationChannel(java.lang.String, java.lang.CharSequence, int);
    ctor protected NotificationChannel(android.os.Parcel);
    method public boolean canBypassDnd();
    method public boolean canShowBadge();
    method public int describeContents();
@@ -5588,7 +5591,6 @@ package android.app {
  public final class NotificationChannelGroup implements android.os.Parcelable {
    ctor public NotificationChannelGroup(java.lang.String, java.lang.CharSequence);
    ctor protected NotificationChannelGroup(android.os.Parcel);
    method public android.app.NotificationChannelGroup clone();
    method public int describeContents();
    method public java.util.List<android.app.NotificationChannel> getChannels();
+55 −3
Original line number Diff line number Diff line
@@ -2393,7 +2393,7 @@ public class Notification implements Parcelable
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Notification(channel=");
        sb.append(getChannel());
        sb.append(getChannelId());
        sb.append(" pri=");
        sb.append(priority);
        sb.append(" contentView=");
@@ -2506,6 +2506,13 @@ public class Notification implements Parcelable
        return mChannelId;
    }

    /**
     * Returns the id of the channel this notification posts to.
     */
    public String getChannelId() {
        return mChannelId;
    }

    /**
     * Returns the time at which this notification should be canceled by the system, if it's not
     * canceled already.
@@ -2514,6 +2521,14 @@ public class Notification implements Parcelable
        return mTimeout;
    }

    /**
     * Returns the duration from posting after which this notification should be canceled by the
     * system, if it's not canceled already.
     */
    public long getTimeoutAfter() {
        return mTimeout;
    }

    /**
     * Returns what icon should be shown for this notification if it is being displayed in a
     * Launcher that supports badging. Will be one of {@link #BADGE_ICON_NONE},
@@ -2525,6 +2540,9 @@ public class Notification implements Parcelable

    /**
     * Returns the {@link ShortcutInfo#getId() id} that this notification supersedes, if any.
     *
     * <p>Used by some Launchers that display notification content to hide shortcuts that duplicate
     * notifications.
     */
    public String getShortcutId() {
        return mShortcutId;
@@ -2770,8 +2788,8 @@ public class Notification implements Parcelable
         * {@link ShortcutInfo#getId() id} of the shortcut, in case the Launcher wants to hide
         * the shortcut.
         *
         * This field will be ignored by Launchers that don't support badging or
         * {@link android.content.pm.ShortcutManager shortcuts}.
         * This field will be ignored by Launchers that don't support badging, don't show
         * notification content, or don't show {@link android.content.pm.ShortcutManager shortcuts}.
         *
         * @param shortcutId the {@link ShortcutInfo#getId() id} of the shortcut this notification
         *                   supersedes
@@ -2815,6 +2833,14 @@ public class Notification implements Parcelable
            return this;
        }

        /**
         * Specifies the channel the notification should be delivered on.
         */
        public Builder setChannelId(String channelId) {
            mN.mChannelId = channelId;
            return this;
        }

        /**
         * Specifies a duration in milliseconds after which this notification should be canceled,
         * if it is not already canceled.
@@ -2824,6 +2850,15 @@ public class Notification implements Parcelable
            return this;
        }

        /**
         * Specifies a duration in milliseconds after which this notification should be canceled,
         * if it is not already canceled.
         */
        public Builder setTimeoutAfter(long durationMs) {
            mN.mTimeout = durationMs;
            return this;
        }

        /**
         * Add a timestamp pertaining to the notification (usually the time the event occurred).
         *
@@ -7914,6 +7949,16 @@ public class Notification implements Parcelable
            return this;
        }

        /**
         * Specifies the channel the notification should be delivered on when shown on TV.
         * It can be different from the channel that the notification is delivered to when
         * posting on a non-TV device.
         */
        public TvExtender setChannelId(String channelId) {
            mChannelId = channelId;
            return this;
        }

        /**
         * Returns the id of the channel this notification posts to on TV.
         */
@@ -7921,6 +7966,13 @@ public class Notification implements Parcelable
            return mChannelId;
        }

        /**
         * Returns the id of the channel this notification posts to on TV.
         */
        public String getChannelId() {
            return mChannelId;
        }

        /**
         * Supplies a {@link PendingIntent} to be sent when the notification is selected on TV.
         * If provided, it is used instead of the content intent specified
+6 −2
Original line number Diff line number Diff line
@@ -40,8 +40,9 @@ import java.util.Arrays;
public final class NotificationChannel implements Parcelable {

    /**
     * The id of the default channel for an app. All notifications posted without a notification
     * channel specified are posted to this channel.
     * The id of the default channel for an app. This id is reserved by the system. All
     * notifications posted from apps targeting {@link android.os.Build.VERSION_CODES#N_MR1} or
     * earlier without a notification channel specified are posted to this channel.
     */
    public static final String DEFAULT_CHANNEL_ID = "miscellaneous";

@@ -170,6 +171,9 @@ public final class NotificationChannel implements Parcelable {
        this.mImportance = importance;
    }

    /**
     * @hide
     */
    protected NotificationChannel(Parcel in) {
        if (in.readByte() != 0) {
            mId = in.readString();
Loading