Fix lint errors
Format correction by ktlint.py --format
Test: TH
Bug: N/A
Change-Id: I886bdc9dee9c9e86bfdce1602343340010015212
diff --git a/tests/integration/src/com/android/server/net/integrationtests/NetworkStatsIntegrationTest.kt b/tests/integration/src/com/android/server/net/integrationtests/NetworkStatsIntegrationTest.kt
index 765e56e..52e502d 100644
--- a/tests/integration/src/com/android/server/net/integrationtests/NetworkStatsIntegrationTest.kt
+++ b/tests/integration/src/com/android/server/net/integrationtests/NetworkStatsIntegrationTest.kt
@@ -299,7 +299,8 @@
val buf = ByteArray(DEFAULT_BUFFER_SIZE)
httpServer.addResponse(
- TestHttpServer.Request(path, NanoHTTPD.Method.POST), NanoHTTPD.Response.Status.OK,
+ TestHttpServer.Request(path, NanoHTTPD.Method.POST),
+ NanoHTTPD.Response.Status.OK,
content = getRandomString(downloadSize)
)
var httpConnection: HttpURLConnection? = null
@@ -349,15 +350,19 @@
) {
operator fun plus(other: BareStats): BareStats {
return BareStats(
- this.rxBytes + other.rxBytes, this.rxPackets + other.rxPackets,
- this.txBytes + other.txBytes, this.txPackets + other.txPackets
+ this.rxBytes + other.rxBytes,
+ this.rxPackets + other.rxPackets,
+ this.txBytes + other.txBytes,
+ this.txPackets + other.txPackets
)
}
operator fun minus(other: BareStats): BareStats {
return BareStats(
- this.rxBytes - other.rxBytes, this.rxPackets - other.rxPackets,
- this.txBytes - other.txBytes, this.txPackets - other.txPackets
+ this.rxBytes - other.rxBytes,
+ this.rxPackets - other.rxPackets,
+ this.txBytes - other.txBytes,
+ this.txPackets - other.txPackets
)
}
@@ -405,8 +410,12 @@
private fun getUidDetail(iface: String, tag: Int): BareStats {
return getNetworkStatsThat(iface, tag) { nsm, template ->
nsm.queryDetailsForUidTagState(
- template, Long.MIN_VALUE, Long.MAX_VALUE,
- Process.myUid(), tag, Bucket.STATE_ALL
+ template,
+ Long.MIN_VALUE,
+ Long.MAX_VALUE,
+ Process.myUid(),
+ tag,
+ Bucket.STATE_ALL
)
}
}
@@ -498,28 +507,36 @@
assertInRange(
"Unexpected iface traffic stats",
after.iface,
- before.trafficStatsIface, after.trafficStatsIface,
- lower, upper
+ before.trafficStatsIface,
+ after.trafficStatsIface,
+ lower,
+ upper
)
// Uid traffic stats are counted in both direction because the external network
// traffic is also attributed to the test uid.
assertInRange(
"Unexpected uid traffic stats",
after.iface,
- before.trafficStatsUid, after.trafficStatsUid,
- lower + lower.reverse(), upper + upper.reverse()
+ before.trafficStatsUid,
+ after.trafficStatsUid,
+ lower + lower.reverse(),
+ upper + upper.reverse()
)
assertInRange(
"Unexpected non-tagged summary stats",
after.iface,
- before.statsSummary, after.statsSummary,
- lower, upper
+ before.statsSummary,
+ after.statsSummary,
+ lower,
+ upper
)
assertInRange(
"Unexpected non-tagged uid stats",
after.iface,
- before.statsUid, after.statsUid,
- lower, upper
+ before.statsUid,
+ after.statsUid,
+ lower,
+ upper
)
}
@@ -546,14 +563,16 @@
assertInRange(
"Unexpected tagged summary stats",
after.iface,
- before.taggedSummary, after.taggedSummary,
+ before.taggedSummary,
+ after.taggedSummary,
lower,
upper
)
assertInRange(
"Unexpected tagged uid stats: ${Process.myUid()}",
after.iface,
- before.taggedUid, after.taggedUid,
+ before.taggedUid,
+ after.taggedUid,
lower,
upper
)
@@ -570,7 +589,8 @@
) {
// Passing the value after operation and the value before operation to dump the actual
// numbers if it fails.
- assertTrue(checkInRange(before, after, lower, upper),
+ assertTrue(
+ checkInRange(before, after, lower, upper),
"$tag on $iface: $after - $before is not within range [$lower, $upper]"
)
}