Resume before releasing network request
Technically, this does not matter. If the network goes away before
resume is called, then resume will fail. But the network is going away
anyway... In any case, tearing down the test in opposite order of setup
is good practice.
Test: TH
Change-Id: I21f95499dbddb6003ac12c51a67a7638058e20e3
diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
index 38f46db..da5b00e 100644
--- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
+++ b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
@@ -115,12 +115,12 @@
@After
fun tearDown() {
- if (::networkCallback.isInitialized) {
- cm.unregisterNetworkCallback(networkCallback)
- }
if (::ifname.isInitialized) {
runShellCommand("cmd network_stack apf $ifname resume")
}
+ if (::networkCallback.isInitialized) {
+ cm.unregisterNetworkCallback(networkCallback)
+ }
}
@Test