am a49ee229: am 35d0dea3: am 1c743650: Merge "Sanity check network stats coming from disk." into jb-mr1-dev

* commit 'a49ee229138192aff86676da1d511cf4753ddba2':
  Sanity check network stats coming from disk.
This commit is contained in:
Jeff Sharkey
2012-11-02 15:57:53 -07:00
committed by Android Git Automerger

View File

@@ -177,6 +177,12 @@ public class NetworkStatsHistory implements Parcelable {
throw new ProtocolException("unexpected version: " + version); throw new ProtocolException("unexpected version: " + version);
} }
} }
if (bucketStart.length != bucketCount || rxBytes.length != bucketCount
|| rxPackets.length != bucketCount || txBytes.length != bucketCount
|| txPackets.length != bucketCount || operations.length != bucketCount) {
throw new ProtocolException("Mismatched history lengths");
}
} }
public void writeToStream(DataOutputStream out) throws IOException { public void writeToStream(DataOutputStream out) throws IOException {