Skip to content
Snippets Groups Projects
Commit f88fccde authored by Patrick Rohr's avatar Patrick Rohr
Browse files

Unregister NetworkCallback in NetworkStatsManagerTest

NetworkStatsManagerTest issues NetworkRequests but does not release
them. In addition, it performs blocking operations inside the
onAvailable() callback that runs on the shared ConnectivityThread
impacting tests that run later.

Test: TH
Bug: 272147742
Change-Id: Ide2f5ba0b12752099d7665deaa9050463cd7ebee
parent f0afc538
No related branches found
No related tags found
No related merge requests found
......@@ -387,6 +387,7 @@ public class NetworkStatsManagerTest {
now = System.currentTimeMillis();
}
}
mCm.unregisterNetworkCallback(callback);
if (callback.success) {
mNetworkInterfacesToTest[networkTypeIndex].setMetered(callback.metered);
mNetworkInterfacesToTest[networkTypeIndex].setRoaming(callback.roaming);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment