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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user