Snap for 12272146 from 38cc6cd896256319ef2318e5063daba498d0930e to 24Q4-release
Change-Id: I47c81c7dfbc83db6afacc3df29d261b74a4be8ea
diff --git a/hostapd/Android.bp b/hostapd/Android.bp
index 36b9bf1..8fb93db 100644
--- a/hostapd/Android.bp
+++ b/hostapd/Android.bp
@@ -333,9 +333,10 @@
}
// This manifest can used by a vendor apex module for hostapd as well.
-filegroup {
+vintf_fragment {
name: "android.hardware.wifi.hostapd.xml",
- srcs: ["android.hardware.wifi.hostapd.xml"],
+ src: "android.hardware.wifi.hostapd.xml",
+ soc_specific: true,
}
// Generated by building hostapd_cli and printing LOCAL_SRC_FILES
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 35ada83..40c528b 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -1178,7 +1178,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_VINTF_FRAGMENTS := android.hardware.wifi.hostapd.xml
+LOCAL_REQUIRED_MODULES += android.hardware.wifi.hostapd.xml
ifdef CONFIG_DRIVER_CUSTOM
LOCAL_STATIC_LIBRARIES := libCustomWifi
endif
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index 98152be..eb4224b 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -1973,7 +1973,7 @@
LOCAL_SHARED_LIBRARIES += libutils libbase
LOCAL_SHARED_LIBRARIES += libbinder_ndk
LOCAL_STATIC_LIBRARIES += libwpa_aidl
-LOCAL_VINTF_FRAGMENTS := aidl/android.hardware.wifi.supplicant.xml
+LOCAL_REQUIRED_MODULES += android.hardware.wifi.supplicant.xml
ifeq ($(WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY), true)
LOCAL_INIT_RC=aidl/android.hardware.wifi.supplicant-service.rc
endif
diff --git a/wpa_supplicant/aidl/Android.bp b/wpa_supplicant/aidl/Android.bp
index 2175462..d523630 100644
--- a/wpa_supplicant/aidl/Android.bp
+++ b/wpa_supplicant/aidl/Android.bp
@@ -59,9 +59,10 @@
],
}
-filegroup {
+vintf_fragment {
name: "android.hardware.wifi.supplicant.xml",
- srcs: ["android.hardware.wifi.supplicant.xml"],
+ src: "android.hardware.wifi.supplicant.xml",
+ soc_specific: true,
}
soong_config_module_type {
diff --git a/wpa_supplicant/aidl/aidl_return_util.h b/wpa_supplicant/aidl/aidl_return_util.h
index 109723a..2cb8b5a 100644
--- a/wpa_supplicant/aidl/aidl_return_util.h
+++ b/wpa_supplicant/aidl/aidl_return_util.h
@@ -10,6 +10,12 @@
#define AIDL_RETURN_UTIL_H_
#include <aidl/android/hardware/wifi/supplicant/SupplicantStatusCode.h>
+#include <mutex>
+
+namespace {
+ // Mutex serializes requests when this process is called by multiple clients
+ std::mutex aidl_return_mutex;
+}
namespace aidl {
namespace android {
@@ -33,6 +39,7 @@
ObjT* obj, SupplicantStatusCode status_code_if_invalid, WorkFuncT&& work,
Args&&... args)
{
+ std::lock_guard<std::mutex> guard(aidl_return_mutex);
if (obj->isValid()) {
return (obj->*work)(std::forward<Args>(args)...);
} else {
@@ -47,6 +54,7 @@
ObjT* obj, SupplicantStatusCode status_code_if_invalid, WorkFuncT&& work,
ReturnT* ret_val, Args&&... args)
{
+ std::lock_guard<std::mutex> guard(aidl_return_mutex);
if (obj->isValid()) {
auto call_pair = (obj->*work)(std::forward<Args>(args)...);
*ret_val = call_pair.first;