diff options
author | Dongzhuo Zhang <dongzhuozhang@google.com> | 2022-06-01 01:24:32 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-06-01 01:24:32 +0000 |
commit | c41e744b4bf5cbb6c262cd6de12b7a089698e6d9 (patch) | |
tree | e9ca3739f1d168cd4df2d04447a9892542f851e5 | |
parent | 326a20dfb2f421993f55ec6f02ad59388158e5bc (diff) | |
parent | 16a3c34791322ff3ca6c02ce4dd09695764c96e0 (diff) | |
download | ContactsProvider-c41e744b4bf5cbb6c262cd6de12b7a089698e6d9.tar.gz |
Change the CP2 logging to be correct order. The order of the logging fields must match the one in atoms.proto. am: 16a3c34791
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/providers/ContactsProvider/+/18600557
Change-Id: If19efce9c6eb350f485220a0c90ffc4ca64bfbcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | src/com/android/providers/contacts/util/LogUtils.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/providers/contacts/util/LogUtils.java b/src/com/android/providers/contacts/util/LogUtils.java index 368411c7..23e2b140 100644 --- a/src/com/android/providers/contacts/util/LogUtils.java +++ b/src/com/android/providers/contacts/util/LogUtils.java @@ -54,6 +54,9 @@ public class LogUtils { private static final int STATSD_LOG_ATOM_ID = 301; + + // The write methods must be called in the same order as the order of fields in the + // atom (frameworks/proto_logging/stats/atoms.proto) definition. public static void log(LogFields logFields) { StatsLog.write(StatsEvent.newBuilder() .setAtomId(STATSD_LOG_ATOM_ID) @@ -61,9 +64,9 @@ public class LogUtils { .writeInt(logFields.getUriType()) .writeInt(getCallerType(logFields.isCallerIsSyncAdapter())) .writeInt(getResultType(logFields.getException())) - .writeInt(logFields.getTaskType()) .writeInt(logFields.getResultCount()) .writeLong(getLatencyMicros(logFields.getStartNanos())) + .writeInt(logFields.getTaskType()) .usePooledBuffer() .build()); } |