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

Commit 60eef134 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by Android (Google) Code Review
Browse files

Merge "New constructor for Notification.Builder takes a channelId."

parents 132dffbc 5caa2763
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5197,7 +5197,8 @@ package android.app {
  }
  public static class Notification.Builder {
    ctor public Notification.Builder(android.content.Context);
    ctor public Notification.Builder(android.content.Context, java.lang.String);
    ctor public deprecated Notification.Builder(android.content.Context);
    method public deprecated android.app.Notification.Builder addAction(int, java.lang.CharSequence, android.app.PendingIntent);
    method public android.app.Notification.Builder addAction(android.app.Notification.Action);
    method public android.app.Notification.Builder addExtras(android.os.Bundle);
+2 −1
Original line number Diff line number Diff line
@@ -5360,7 +5360,8 @@ package android.app {
  }
  public static class Notification.Builder {
    ctor public Notification.Builder(android.content.Context);
    ctor public Notification.Builder(android.content.Context, java.lang.String);
    ctor public deprecated Notification.Builder(android.content.Context);
    method public deprecated android.app.Notification.Builder addAction(int, java.lang.CharSequence, android.app.PendingIntent);
    method public android.app.Notification.Builder addAction(android.app.Notification.Action);
    method public android.app.Notification.Builder addExtras(android.os.Bundle);
+2 −1
Original line number Diff line number Diff line
@@ -5207,7 +5207,8 @@ package android.app {
  }
  public static class Notification.Builder {
    ctor public Notification.Builder(android.content.Context);
    ctor public Notification.Builder(android.content.Context, java.lang.String);
    ctor public deprecated Notification.Builder(android.content.Context);
    method public deprecated android.app.Notification.Builder addAction(int, java.lang.CharSequence, android.app.PendingIntent);
    method public android.app.Notification.Builder addAction(android.app.Notification.Action);
    method public android.app.Notification.Builder addExtras(android.os.Bundle);
+15 −1
Original line number Diff line number Diff line
@@ -2486,9 +2486,23 @@ public class Notification implements Parcelable
         *            A {@link Context} that will be used by the Builder to construct the
         *            RemoteViews. The Context will not be held past the lifetime of this Builder
         *            object.
         * @param channelId
         *            The constructed Notification will be posted on this
         *            {@link NotificationChannel}. To use a NotificationChannel, it must first be
         *            created using {@link NotificationManager#createNotificationChannel}.
         */
        public Builder(Context context, String channelId) {
            this(context, (Notification) null);
            mN.mChannelId = channelId;
        }

        /**
         * @deprecated use {@link Notification.Builder#Notification.Builder(Context, String)}
         * instead. All posted Notifications must specify a NotificationChannel Id.
         */
        @Deprecated
        public Builder(Context context) {
            this(context, null);
            this(context, (Notification) null);
        }

        /**