Loading core/proto/android/server/usagestatsservice.proto +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ message IntervalStatsProto { optional int32 task_root_package_index = 15; // task_root_class_index contains the index + 1 of the task root class name in the string pool optional int32 task_root_class_index = 16; // locus_id_index contains the index + 1 of the locus id in the string pool optional int32 locus_id_index = 17; } // The following fields contain supplemental data used to build IntervalStats, such as a string Loading services/usage/java/com/android/server/usage/IntervalStats.java +9 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,10 @@ public class IntervalStats { event.mTaskRootClass = getCachedStringRef(stringPool.get( parser.readInt(IntervalStatsProto.Event.TASK_ROOT_CLASS_INDEX) - 1)); break; case (int) IntervalStatsProto.Event.LOCUS_ID_INDEX: event.mLocusId = getCachedStringRef(stringPool.get( parser.readInt(IntervalStatsProto.Event.LOCUS_ID_INDEX) - 1)); break; case ProtoInputStream.NO_MORE_FIELDS: // Handle default values for certain events types switch (event.mEventType) { Loading @@ -252,6 +256,11 @@ public class IntervalStats { event.mNotificationChannelId = ""; } break; case LOCUS_ID_SET: if (event.mLocusId == null) { event.mLocusId = ""; } break; } return event; } Loading services/usage/java/com/android/server/usage/UsageStatsProto.java +7 −0 Original line number Diff line number Diff line Loading @@ -481,6 +481,13 @@ final class UsageStatsProto { } } break; case UsageEvents.Event.LOCUS_ID_SET: if (event.mLocusId != null) { final int locusIdIndex = stats.mStringCache.indexOf(event.mLocusId); if (locusIdIndex >= 0) { proto.write(IntervalStatsProto.Event.LOCUS_ID_INDEX, locusIdIndex + 1); } } } proto.end(token); } Loading Loading
core/proto/android/server/usagestatsservice.proto +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ message IntervalStatsProto { optional int32 task_root_package_index = 15; // task_root_class_index contains the index + 1 of the task root class name in the string pool optional int32 task_root_class_index = 16; // locus_id_index contains the index + 1 of the locus id in the string pool optional int32 locus_id_index = 17; } // The following fields contain supplemental data used to build IntervalStats, such as a string Loading
services/usage/java/com/android/server/usage/IntervalStats.java +9 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,10 @@ public class IntervalStats { event.mTaskRootClass = getCachedStringRef(stringPool.get( parser.readInt(IntervalStatsProto.Event.TASK_ROOT_CLASS_INDEX) - 1)); break; case (int) IntervalStatsProto.Event.LOCUS_ID_INDEX: event.mLocusId = getCachedStringRef(stringPool.get( parser.readInt(IntervalStatsProto.Event.LOCUS_ID_INDEX) - 1)); break; case ProtoInputStream.NO_MORE_FIELDS: // Handle default values for certain events types switch (event.mEventType) { Loading @@ -252,6 +256,11 @@ public class IntervalStats { event.mNotificationChannelId = ""; } break; case LOCUS_ID_SET: if (event.mLocusId == null) { event.mLocusId = ""; } break; } return event; } Loading
services/usage/java/com/android/server/usage/UsageStatsProto.java +7 −0 Original line number Diff line number Diff line Loading @@ -481,6 +481,13 @@ final class UsageStatsProto { } } break; case UsageEvents.Event.LOCUS_ID_SET: if (event.mLocusId != null) { final int locusIdIndex = stats.mStringCache.indexOf(event.mLocusId); if (locusIdIndex >= 0) { proto.write(IntervalStatsProto.Event.LOCUS_ID_INDEX, locusIdIndex + 1); } } } proto.end(token); } Loading