summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2018-05-17 16:38:51 -0700
committerRoshan Pius <rpius@google.com>2018-05-17 16:40:19 -0700
commitddaa720025e435d3c21aa200c00c8da64c95e289 (patch)
tree465b311629906aff5ee41f1606184b8d1991f0f4 /tests
parent89b55624576c60a1a42b9111c8bde2011f57a407 (diff)
WifiVendorHal: Make HAL state change callback synchronous
Ensure that the HAL callback is synchronous (not posted to handler because it will cause a race with the onDestroyed callback is synchronous). Bug: 79532177 Test: Unit tests Test: Kill wifi HAL and ensured that interface is not destroyed by HalDeviceManager before WifiStateMachine processed the death notification. Change-Id: Ie9237609466d790a4a09b8bc2d2648fef9414546
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
index f7a3c4be6..0f8f56f66 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
@@ -87,7 +87,6 @@ import android.net.wifi.WifiManager;
import android.net.wifi.WifiScanner;
import android.net.wifi.WifiSsid;
import android.net.wifi.WifiWakeReasonAndCounts;
-import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.os.test.TestLooper;
@@ -300,8 +299,7 @@ public class WifiVendorHalTest {
mWifiVendorHal.initialize(mVendorHalDeathHandler);
ArgumentCaptor<WifiVendorHal.HalDeviceManagerStatusListener> hdmCallbackCaptor =
ArgumentCaptor.forClass(WifiVendorHal.HalDeviceManagerStatusListener.class);
- verify(mHalDeviceManager).registerStatusListener(hdmCallbackCaptor.capture(),
- any(Handler.class));
+ verify(mHalDeviceManager).registerStatusListener(hdmCallbackCaptor.capture(), eq(null));
mHalDeviceManagerStatusCallbacks = hdmCallbackCaptor.getValue();
}