Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules. The #dumpDebug name is more appropriate than #writeToProto. Bug: 142279786 Test: Manual Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
This commit is contained in:
@@ -114,7 +114,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
return builder.append("}").toString();
|
||||
}
|
||||
|
||||
public void writeToProto(ProtoOutputStream proto, long tag) {
|
||||
public void dumpDebug(ProtoOutputStream proto, long tag) {
|
||||
final long start = proto.start(tag);
|
||||
|
||||
proto.write(NetworkIdentityProto.TYPE, mType);
|
||||
|
||||
@@ -684,7 +684,7 @@ public class NetworkStatsHistory implements Parcelable {
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToProto(ProtoOutputStream proto, long tag) {
|
||||
public void dumpDebug(ProtoOutputStream proto, long tag) {
|
||||
final long start = proto.start(tag);
|
||||
|
||||
proto.write(NetworkStatsHistoryProto.BUCKET_DURATION_MS, bucketDuration);
|
||||
@@ -693,11 +693,11 @@ public class NetworkStatsHistory implements Parcelable {
|
||||
final long startBucket = proto.start(NetworkStatsHistoryProto.BUCKETS);
|
||||
|
||||
proto.write(NetworkStatsHistoryBucketProto.BUCKET_START_MS, bucketStart[i]);
|
||||
writeToProto(proto, NetworkStatsHistoryBucketProto.RX_BYTES, rxBytes, i);
|
||||
writeToProto(proto, NetworkStatsHistoryBucketProto.RX_PACKETS, rxPackets, i);
|
||||
writeToProto(proto, NetworkStatsHistoryBucketProto.TX_BYTES, txBytes, i);
|
||||
writeToProto(proto, NetworkStatsHistoryBucketProto.TX_PACKETS, txPackets, i);
|
||||
writeToProto(proto, NetworkStatsHistoryBucketProto.OPERATIONS, operations, i);
|
||||
dumpDebug(proto, NetworkStatsHistoryBucketProto.RX_BYTES, rxBytes, i);
|
||||
dumpDebug(proto, NetworkStatsHistoryBucketProto.RX_PACKETS, rxPackets, i);
|
||||
dumpDebug(proto, NetworkStatsHistoryBucketProto.TX_BYTES, txBytes, i);
|
||||
dumpDebug(proto, NetworkStatsHistoryBucketProto.TX_PACKETS, txPackets, i);
|
||||
dumpDebug(proto, NetworkStatsHistoryBucketProto.OPERATIONS, operations, i);
|
||||
|
||||
proto.end(startBucket);
|
||||
}
|
||||
@@ -705,7 +705,7 @@ public class NetworkStatsHistory implements Parcelable {
|
||||
proto.end(start);
|
||||
}
|
||||
|
||||
private static void writeToProto(ProtoOutputStream proto, long tag, long[] array, int index) {
|
||||
private static void dumpDebug(ProtoOutputStream proto, long tag, long[] array, int index) {
|
||||
if (array != null) {
|
||||
proto.write(tag, array[index]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user