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

This commit is contained in:
TreeHugger Robot
2020-09-23 20:34:28 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}