Remove use of MockLooper AutoDispatch from non-blocking calls
AutoDispatch is not needed with non-blocking sendMessage calls. Remove
two instances of this error.
BUG=27278081
Change-Id: Id346d76e971c361149ae885a8b8056660b61e5f3
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
index a8d06ac..2ab308a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
@@ -765,9 +765,8 @@
dhcpResults.addDns("8.8.8.8");
dhcpResults.setLeaseDuration(3600);
- mLooper.startAutoDispatch();
mTestIpManager.injectDhcpSuccess(dhcpResults);
- mLooper.stopAutoDispatch();
+ mLooper.dispatchAll();
assertEquals("ConnectedState", getCurrentState().getName());
}
@@ -794,9 +793,8 @@
assertEquals("ObtainingIpState", getCurrentState().getName());
- mLooper.startAutoDispatch();
mTestIpManager.injectDhcpFailure();
- mLooper.stopAutoDispatch();
+ mLooper.dispatchAll();
assertEquals("DisconnectingState", getCurrentState().getName());
}