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

Commit 0e2927e7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Statsd logging: Fix UiEvent logging instance IDs."

parents 3c71366c 4a46eaf3
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);
        }