From ddaa720025e435d3c21aa200c00c8da64c95e289 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Thu, 17 May 2018 16:38:51 -0700 Subject: 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 --- service/java/com/android/server/wifi/WifiVendorHal.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java index 6041a681f..f5b118795 100644 --- a/service/java/com/android/server/wifi/WifiVendorHal.java +++ b/service/java/com/android/server/wifi/WifiVendorHal.java @@ -297,8 +297,7 @@ public class WifiVendorHal { public boolean initialize(WifiNative.VendorHalDeathEventHandler handler) { synchronized (sLock) { mHalDeviceManager.initialize(); - mHalDeviceManager.registerStatusListener(mHalDeviceManagerStatusCallbacks, - mHalEventHandler); + mHalDeviceManager.registerStatusListener(mHalDeviceManagerStatusCallbacks, null); mDeathEventHandler = handler; return true; } -- cgit v1.2.3