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

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

Merge "Add notification opPkg to logs"

parents 544ff6d6 9846076a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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() {
+4 −0
Original line number Diff line number Diff line
@@ -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 {
+3 −0
Original line number Diff line number Diff line
@@ -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);