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

Commit 261caa80 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[Minimal HUN] Log package name and instance ID for minimal HUNs" into main

parents a667543d 0252fd3b
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -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();
    }

    /**