Merge "Add notification opPkg to logs"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8180db886c
@@ -292,9 +292,9 @@ public class StatusBarNotification implements Parcelable {
|
||||
return uid;
|
||||
}
|
||||
|
||||
/** The package that posted the notification.
|
||||
*<p>
|
||||
* Might be different from {@link #getPackageName()} if the app owning the notification has
|
||||
/**
|
||||
* The package that posted the notification.
|
||||
* <p> Might be different from {@link #getPackageName()} if the app owning the notification has
|
||||
* a {@link NotificationManager#setNotificationDelegate(String) notification delegate}.
|
||||
*/
|
||||
public @NonNull String getOpPkg() {
|
||||
|
||||
@@ -66,6 +66,10 @@ message NotificationRecordProto {
|
||||
optional bool can_show_light = 8;
|
||||
optional string group_key = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
|
||||
optional sint32 importance = 10;
|
||||
// The package the notification was posted for.
|
||||
optional string package = 11;
|
||||
// The package that posted the notification. It might not be the same as package.
|
||||
optional string delegate_package = 12;
|
||||
}
|
||||
|
||||
message ListenersDisablingEffectsProto {
|
||||
|
||||
@@ -438,6 +438,8 @@ public final class NotificationRecord {
|
||||
if (getAudioAttributes() != null) {
|
||||
getAudioAttributes().writeToProto(proto, NotificationRecordProto.AUDIO_ATTRIBUTES);
|
||||
}
|
||||
proto.write(NotificationRecordProto.PACKAGE, sbn.getPackageName());
|
||||
proto.write(NotificationRecordProto.DELEGATE_PACKAGE, sbn.getOpPkg());
|
||||
|
||||
proto.end(token);
|
||||
}
|
||||
@@ -458,6 +460,7 @@ public final class NotificationRecord {
|
||||
pw.println(prefix + this);
|
||||
prefix = prefix + " ";
|
||||
pw.println(prefix + "uid=" + sbn.getUid() + " userId=" + sbn.getUserId());
|
||||
pw.println(prefix + "opPkg=" + sbn.getOpPkg());
|
||||
pw.println(prefix + "icon=" + iconStr);
|
||||
pw.println(prefix + "flags=0x" + Integer.toHexString(notification.flags));
|
||||
pw.println(prefix + "pri=" + notification.priority);
|
||||
|
||||
Reference in New Issue
Block a user