Merge "Log sub event type to latency logger." into tm-qpr-dev

This commit is contained in:
Holly Jiuyu Sun
2022-10-31 19:28:27 +00:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 2 deletions

View File

@@ -473,6 +473,7 @@ public class StatsLogCompatManager extends StatsLogManager {
private int mPackageId = 0;
private long mLatencyInMillis;
private int mQueryLength = -1;
private int mSubEventType = 0;
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
mContext = context;
@@ -509,6 +510,12 @@ public class StatsLogCompatManager extends StatsLogManager {
return this;
}
@Override
public StatsLatencyLogger withSubEventType(int type) {
this.mSubEventType = type;
return this;
}
@Override
public void log(EventEnum event) {
if (IS_VERBOSE) {
@@ -526,7 +533,8 @@ public class StatsLogCompatManager extends StatsLogManager {
mPackageId, // package_id
mLatencyInMillis, // latency_in_millis
mType.getId(), //type
mQueryLength // query_length
mQueryLength, // query_length
mSubEventType // sub_event_type
);
}
}

View File

@@ -781,7 +781,6 @@ public class StatsLogManager implements ResourceBasedOverride {
public int getId() {
return mId;
}
}
/**
@@ -813,6 +812,13 @@ public class StatsLogManager implements ResourceBasedOverride {
return this;
}
/**
* Sets sub event type.
*/
default StatsLatencyLogger withSubEventType(int type) {
return this;
}
/**
* Sets packageId of log message.
*/