summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-08-26 07:55:43 -0700
committerRoshan Pius <rpius@google.com>2019-08-26 08:00:41 -0700
commit8a12ed4598483421f6bc8af41f03c248e2b7204b (patch)
tree0a936945cc9551d4f5f9f12ea58724abb18f6cda /tests
parent36aa13d2f3b0230dfbdb91baceece854e3fa4ee6 (diff)
WifiVendorHal: Post callback to invoke RadioModeChange callback
Avoid calling WifiNative callbacks directly from the Hwbinder thread. Bug: 139985227 Test: atest com.android.server.wifi.WifiVendorHalTest Change-Id: I704b7a32eef0b518173793ab43f5644be998fd75
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
index 5a95b952f..aa44023ae 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
@@ -3110,6 +3110,7 @@ public class WifiVendorHalTest {
radioModeInfos.add(radioModeInfo1);
mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos);
+ mLooper.dispatchAll();
verify(mVendorHalRadioModeChangeHandler).onDbs();
verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler);
@@ -3142,6 +3143,7 @@ public class WifiVendorHalTest {
radioModeInfos.add(radioModeInfo1);
mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos);
+ mLooper.dispatchAll();
verify(mVendorHalRadioModeChangeHandler).onSbs(WifiScanner.WIFI_BAND_5_GHZ);
verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler);
@@ -3171,6 +3173,7 @@ public class WifiVendorHalTest {
radioModeInfos.add(radioModeInfo0);
mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos);
+ mLooper.dispatchAll();
verify(mVendorHalRadioModeChangeHandler).onScc(WifiScanner.WIFI_BAND_5_GHZ);
verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler);
@@ -3200,6 +3203,7 @@ public class WifiVendorHalTest {
radioModeInfos.add(radioModeInfo0);
mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos);
+ mLooper.dispatchAll();
verify(mVendorHalRadioModeChangeHandler).onMcc(WifiScanner.WIFI_BAND_BOTH);
verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler);
@@ -3230,6 +3234,7 @@ public class WifiVendorHalTest {
radioModeInfos.add(radioModeInfo1);
mIWifiChipEventCallbackV12.onRadioModeChange(radioModeInfos);
+ mLooper.dispatchAll();
// Ignored....
verifyNoMoreInteractions(mVendorHalRadioModeChangeHandler);