Loading api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -35000,7 +35000,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -35008,6 +35008,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime(); api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37800,7 +37800,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -37808,6 +37808,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime(); api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -35090,7 +35090,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -35098,6 +35098,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime(); core/java/android/service/notification/StatusBarNotification.java +20 −12 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.service.notification; import android.app.Notification; import android.app.NotificationChannel; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading @@ -42,25 +43,21 @@ public class StatusBarNotification implements Parcelable { private final Notification notification; private final UserHandle user; private final long postTime; private final NotificationChannel channel; private Context mContext; // used for inflation & icon expansion /** @hide */ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, int score, Notification notification, UserHandle user) { this(pkg, opPkg, id, tag, uid, initialPid, score, notification, user, System.currentTimeMillis()); } /** @hide */ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, Notification notification, UserHandle user, String overrideGroupKey, long postTime) { public StatusBarNotification(String pkg, String opPkg, NotificationChannel channel, int id, String tag, int uid, int initialPid, Notification notification, UserHandle user, String overrideGroupKey, long postTime) { if (pkg == null) throw new NullPointerException(); if (notification == null) throw new NullPointerException(); if (channel == null) throw new IllegalArgumentException(); this.pkg = pkg; this.opPkg = opPkg; this.channel = channel; this.id = id; this.tag = tag; this.uid = uid; Loading @@ -73,6 +70,7 @@ public class StatusBarNotification implements Parcelable { this.groupKey = groupKey(); } @Deprecated public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, int score, Notification notification, UserHandle user, long postTime) { Loading @@ -90,6 +88,7 @@ public class StatusBarNotification implements Parcelable { this.postTime = postTime; this.key = key(); this.groupKey = groupKey(); this.channel = null; } public StatusBarNotification(Parcel in) { Loading @@ -113,6 +112,7 @@ public class StatusBarNotification implements Parcelable { } this.key = key(); this.groupKey = groupKey(); this.channel = NotificationChannel.CREATOR.createFromParcel(in); } private String key() { Loading Loading @@ -182,6 +182,7 @@ public class StatusBarNotification implements Parcelable { } else { out.writeInt(0); } this.channel.writeToParcel(out, flags); } public int describeContents() { Loading @@ -208,14 +209,14 @@ public class StatusBarNotification implements Parcelable { public StatusBarNotification cloneLight() { final Notification no = new Notification(); this.notification.cloneInto(no, false); // light copy return new StatusBarNotification(this.pkg, this.opPkg, return new StatusBarNotification(this.pkg, this.opPkg, this.channel, this.id, this.tag, this.uid, this.initialPid, no, this.user, this.overrideGroupKey, this.postTime); } @Override public StatusBarNotification clone() { return new StatusBarNotification(this.pkg, this.opPkg, return new StatusBarNotification(this.pkg, this.opPkg, this.channel, this.id, this.tag, this.uid, this.initialPid, this.notification.clone(), this.user, this.overrideGroupKey, this.postTime); } Loading Loading @@ -334,6 +335,13 @@ public class StatusBarNotification implements Parcelable { return overrideGroupKey; } /** * Returns the channel this notification was posted to. */ public NotificationChannel getNotificationChannel() { return channel; } /** * @hide */ Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +2 −2 Original line number Diff line number Diff line Loading @@ -1649,9 +1649,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, newNotification.headsUpContentView = sbn.getNotification().headsUpContentView; StatusBarNotification newSbn = new StatusBarNotification(sbn.getPackageName(), sbn.getOpPkg(), sbn.getOpPkg(), sbn.getNotificationChannel(), sbn.getId(), sbn.getTag(), sbn.getUid(), sbn.getInitialPid(), 0, newNotification, sbn.getUser(), sbn.getPostTime()); newNotification, sbn.getUser(), sbn.getOverrideGroupKey(), sbn.getPostTime()); updateNotification(newSbn, null); mKeysKeptForRemoteInput.add(entry.key); Loading Loading
api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -35000,7 +35000,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -35008,6 +35008,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime();
api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -37800,7 +37800,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -37808,6 +37808,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime();
api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -35090,7 +35090,7 @@ package android.service.notification { } public class StatusBarNotification implements android.os.Parcelable { ctor public StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public deprecated StatusBarNotification(java.lang.String, java.lang.String, int, java.lang.String, int, int, int, android.app.Notification, android.os.UserHandle, long); ctor public StatusBarNotification(android.os.Parcel); method public android.service.notification.StatusBarNotification clone(); method public int describeContents(); Loading @@ -35098,6 +35098,7 @@ package android.service.notification { method public int getId(); method public java.lang.String getKey(); method public android.app.Notification getNotification(); method public android.app.NotificationChannel getNotificationChannel(); method public java.lang.String getOverrideGroupKey(); method public java.lang.String getPackageName(); method public long getPostTime();
core/java/android/service/notification/StatusBarNotification.java +20 −12 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.service.notification; import android.app.Notification; import android.app.NotificationChannel; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; Loading @@ -42,25 +43,21 @@ public class StatusBarNotification implements Parcelable { private final Notification notification; private final UserHandle user; private final long postTime; private final NotificationChannel channel; private Context mContext; // used for inflation & icon expansion /** @hide */ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, int score, Notification notification, UserHandle user) { this(pkg, opPkg, id, tag, uid, initialPid, score, notification, user, System.currentTimeMillis()); } /** @hide */ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, Notification notification, UserHandle user, String overrideGroupKey, long postTime) { public StatusBarNotification(String pkg, String opPkg, NotificationChannel channel, int id, String tag, int uid, int initialPid, Notification notification, UserHandle user, String overrideGroupKey, long postTime) { if (pkg == null) throw new NullPointerException(); if (notification == null) throw new NullPointerException(); if (channel == null) throw new IllegalArgumentException(); this.pkg = pkg; this.opPkg = opPkg; this.channel = channel; this.id = id; this.tag = tag; this.uid = uid; Loading @@ -73,6 +70,7 @@ public class StatusBarNotification implements Parcelable { this.groupKey = groupKey(); } @Deprecated public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, int initialPid, int score, Notification notification, UserHandle user, long postTime) { Loading @@ -90,6 +88,7 @@ public class StatusBarNotification implements Parcelable { this.postTime = postTime; this.key = key(); this.groupKey = groupKey(); this.channel = null; } public StatusBarNotification(Parcel in) { Loading @@ -113,6 +112,7 @@ public class StatusBarNotification implements Parcelable { } this.key = key(); this.groupKey = groupKey(); this.channel = NotificationChannel.CREATOR.createFromParcel(in); } private String key() { Loading Loading @@ -182,6 +182,7 @@ public class StatusBarNotification implements Parcelable { } else { out.writeInt(0); } this.channel.writeToParcel(out, flags); } public int describeContents() { Loading @@ -208,14 +209,14 @@ public class StatusBarNotification implements Parcelable { public StatusBarNotification cloneLight() { final Notification no = new Notification(); this.notification.cloneInto(no, false); // light copy return new StatusBarNotification(this.pkg, this.opPkg, return new StatusBarNotification(this.pkg, this.opPkg, this.channel, this.id, this.tag, this.uid, this.initialPid, no, this.user, this.overrideGroupKey, this.postTime); } @Override public StatusBarNotification clone() { return new StatusBarNotification(this.pkg, this.opPkg, return new StatusBarNotification(this.pkg, this.opPkg, this.channel, this.id, this.tag, this.uid, this.initialPid, this.notification.clone(), this.user, this.overrideGroupKey, this.postTime); } Loading Loading @@ -334,6 +335,13 @@ public class StatusBarNotification implements Parcelable { return overrideGroupKey; } /** * Returns the channel this notification was posted to. */ public NotificationChannel getNotificationChannel() { return channel; } /** * @hide */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +2 −2 Original line number Diff line number Diff line Loading @@ -1649,9 +1649,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, newNotification.headsUpContentView = sbn.getNotification().headsUpContentView; StatusBarNotification newSbn = new StatusBarNotification(sbn.getPackageName(), sbn.getOpPkg(), sbn.getOpPkg(), sbn.getNotificationChannel(), sbn.getId(), sbn.getTag(), sbn.getUid(), sbn.getInitialPid(), 0, newNotification, sbn.getUser(), sbn.getPostTime()); newNotification, sbn.getUser(), sbn.getOverrideGroupKey(), sbn.getPostTime()); updateNotification(newSbn, null); mKeysKeptForRemoteInput.add(entry.key); Loading