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

Commit 4a46eaf3 authored by Will Brockman's avatar Will Brockman
Browse files

Statsd logging: Fix UiEvent logging instance IDs.

Add the instance ID field to statsd UiEventReported calls that lacked
it, because all statsd writes should write all fields.

Fixes: 168760953
Test: atest NotificationManagerServiceTest
Change-Id: I8a6fb7a9e52c2fd818e2b92c62ea5902583b6f9f
parent a28729b6
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -33,7 +33,11 @@ public class UiEventLoggerImpl implements UiEventLogger {
    public void log(UiEventEnum event, int uid, String packageName) {
        final int eventID = event.getId();
        if (eventID > 0) {
            FrameworkStatsLog.write(FrameworkStatsLog.UI_EVENT_REPORTED, eventID, uid, packageName);
            FrameworkStatsLog.write(FrameworkStatsLog.UI_EVENT_REPORTED,
                    /* event_id = 1 */ eventID,
                    /* uid = 2 */ uid,
                    /* package_name = 3 */ packageName,
                    /* instance_id = 4 */ 0);
        }
    }

@@ -42,8 +46,11 @@ public class UiEventLoggerImpl implements UiEventLogger {
            InstanceId instance) {
        final int eventID = event.getId();
        if ((eventID > 0)  && (instance != null)) {
            FrameworkStatsLog.write(FrameworkStatsLog.UI_EVENT_REPORTED, eventID, uid, packageName,
                    instance.getId());
            FrameworkStatsLog.write(FrameworkStatsLog.UI_EVENT_REPORTED,
                    /* event_id = 1 */ eventID,
                    /* uid = 2 */ uid,
                    /* package_name = 3 */ packageName,
                    /* instance_id = 4 */ instance.getId());
        } else {
            log(event, uid, packageName);
        }