diff options
author | 2024-11-14 19:52:45 +0000 | |
---|---|---|
committer | 2024-11-15 09:22:15 +0000 | |
commit | 0252fd3b33705faa71655ccd400ff3cd1c30cc4e (patch) | |
tree | bbd976b3417f5261d572623fa9af3a00bd6e1ad1 | |
parent | f2572f140575d7fd7275c55fbfd3137c78a53600 (diff) |
[Minimal HUN] Log package name and instance ID for minimal HUNs
Bug: 270709257
Fixes: 379159731
Change-Id: I6e491a15327939911196b9b2380a498243cdea60
Flag: android.app.compact_heads_up_notification
Test: Presubmit
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java index 9166e7e9bed2..786d7d9ea0f3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java @@ -573,8 +573,29 @@ public class NotificationContentView extends FrameLayout implements Notification return; } - mUiEventLogger.log( - NotificationCompactHeadsUpEvent.NOTIFICATION_COMPACT_HUN_SHOWN); + final StatusBarNotification containingRowSbn = getContainingRowSbn(); + if (containingRowSbn == null) { + return; + } + + mUiEventLogger.logWithInstanceId( + NotificationCompactHeadsUpEvent.NOTIFICATION_COMPACT_HUN_SHOWN, + containingRowSbn.getUid(), + containingRowSbn.getPackageName(), + containingRowSbn.getInstanceId()); + } + + @Nullable + private StatusBarNotification getContainingRowSbn() { + if (mContainingNotification == null) { + return null; + } + final NotificationEntry entry = mContainingNotification.getEntry(); + if (entry == null) { + return null; + } + + return entry.getSbn(); } /** |