Add missing truncate_timestamp annotation

Add truncate_timestamp annotation to MobileBytesTransfer pullers.

Bug: 153174569
Test: m
Change-Id: I7de231a42f3609005124fc6cb10e71b2d7bd0534
This commit is contained in:
Muhammad Qureshi
2020-05-06 14:50:54 -07:00
parent be0b165b6e
commit 09fc8c4cd2

View File

@@ -30,6 +30,7 @@ import static android.util.MathUtils.abs;
import static android.util.MathUtils.constrain;
import static com.android.internal.util.FrameworkStatsLog.ANNOTATION_ID_IS_UID;
import static com.android.internal.util.FrameworkStatsLog.ANNOTATION_ID_TRUNCATE_TIMESTAMP;
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import static com.android.server.stats.pull.IonMemoryUtil.readProcessSystemIonHeapSizesFromDebugfs;
import static com.android.server.stats.pull.IonMemoryUtil.readSystemIonHeapSizeFromDebugfs;
@@ -757,6 +758,13 @@ public class StatsPullAtomService extends SystemService {
stats.getValues(j, entry);
StatsEvent.Builder e = StatsEvent.newBuilder();
e.setAtomId(atomTag);
switch (atomTag) {
case FrameworkStatsLog.MOBILE_BYTES_TRANSFER:
case FrameworkStatsLog.MOBILE_BYTES_TRANSFER_BY_FG_BG:
e.addBooleanAnnotation(ANNOTATION_ID_TRUNCATE_TIMESTAMP, true);
break;
default:
}
e.writeInt(entry.uid);
e.addBooleanAnnotation(ANNOTATION_ID_IS_UID, true);
if (withFgbg) {