From ff1c289d6ce38a5fd76bf5ba1fda99a55a2fe2c8 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 4 Jan 2021 22:35:57 -0700 Subject: [PATCH] Pivot network statistics to use DataInput/Output. Using these generalized interfaces is more flexible, since it enables us to pivot the implementation being used internally. In particular, an upcoming CL will pivot them to use a more efficient alternative. This is a no-op refactoring. Bug: 176777285 Test: atest FrameworksNetTests CtsNetTestCases Change-Id: Ibd4717174cf1f136e9d5d80172ecb6e493265306 --- .../com/android/server/net/NetworkStatsCollectionTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java index 89146f945e..435c3c0af8 100644 --- a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java +++ b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java @@ -64,7 +64,6 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; @@ -124,7 +123,7 @@ public class NetworkStatsCollectionTest { // now export into a unified format final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - collection.write(new DataOutputStream(bos)); + collection.write(bos); // clear structure completely collection.reset(); @@ -152,7 +151,7 @@ public class NetworkStatsCollectionTest { // now export into a unified format final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - collection.write(new DataOutputStream(bos)); + collection.write(bos); // clear structure completely collection.reset(); @@ -180,7 +179,7 @@ public class NetworkStatsCollectionTest { // now export into a unified format final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - collection.write(new DataOutputStream(bos)); + collection.write(bos); // clear structure completely collection.reset();