wpa_supplicant: HIDL implementation (1/2)
Renamed all file and variable names to "HIDL" from "Binder"/"AIDL".
Commands run:
rename 's/binder/hidl/' *
find . -type f -exec sed -i "s/binder/hidl/g" {} \;
find . -type f -exec sed -i "s/Binder/Hidl/g" {} \;
find . -type f -exec sed -i "s/BINDER/HIDL/g" {} \;
Bug: 31365276
Test: None
Change-Id: I435f91540027d55143eebc03afdbf463b5b092f7
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index e232e10..1c69a9f 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -49,7 +49,7 @@
L_CFLAGS += -mabi=aapcs-linux
endif
-# C++ flags for binder interface
+# C++ flags for hidl interface
L_CPPFLAGS := -std=c++11 -Wall -Werror
# TODO: Remove these allowed warnings later.
L_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter
@@ -1355,9 +1355,9 @@
OBJS += $(DBUS_OBJS)
L_CFLAGS += $(DBUS_CFLAGS)
-ifdef CONFIG_CTRL_IFACE_BINDER
-WPA_SUPPLICANT_USE_BINDER=y
-L_CFLAGS += -DCONFIG_BINDER -DCONFIG_CTRL_IFACE_BINDER
+ifdef CONFIG_CTRL_IFACE_HIDL
+WPA_SUPPLICANT_USE_HIDL=y
+L_CFLAGS += -DCONFIG_HIDL -DCONFIG_CTRL_IFACE_HIDL
endif
ifdef CONFIG_READLINE
@@ -1597,9 +1597,10 @@
ifeq ($(DBUS), y)
LOCAL_SHARED_LIBRARIES += libdbus
endif
-ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
-LOCAL_SHARED_LIBRARIES += libbinder libutils
-LOCAL_STATIC_LIBRARIES += libwpa_binder libwpa_binder_interface
+ifeq ($(WPA_SUPPLICANT_USE_HIDL), y)
+LOCAL_SHARED_LIBRARIES += android.hardware.wifi@1.0
+LOCAL_SHARED_LIBRARIES += libhidl libhwbinder libutils
+LOCAL_STATIC_LIBRARIES += libwpa_hidl
endif
include $(BUILD_EXECUTABLE)
@@ -1641,50 +1642,24 @@
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/wpa_client_include
include $(BUILD_SHARED_LIBRARY)
-ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
-### Binder interface library ###
+ifeq ($(WPA_SUPPLICANT_USE_HIDL), y)
+### Hidl service library ###
########################
-
include $(CLEAR_VARS)
-LOCAL_MODULE := libwpa_binder_interface
-LOCAL_AIDL_INCLUDES := \
- $(LOCAL_PATH)/binder \
- frameworks/native/aidl/binder
-LOCAL_CPPFLAGS := $(L_CPPFLAGS)
-LOCAL_C_INCLUDES = \
- $(LOCAL_PATH)/binder/include
-LOCAL_SRC_FILES := \
- binder/binder_constants.cpp \
- binder/parcelable_iface_params.cpp \
- binder/fi/w1/wpa_supplicant/IIface.aidl \
- binder/fi/w1/wpa_supplicant/IIfaceCallback.aidl \
- binder/fi/w1/wpa_supplicant/INetwork.aidl \
- binder/fi/w1/wpa_supplicant/INetworkCallback.aidl \
- binder/fi/w1/wpa_supplicant/ISupplicant.aidl \
- binder/fi/w1/wpa_supplicant/ISupplicantCallback.aidl
-LOCAL_SHARED_LIBRARIES := libbinder
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/binder/include
-include $(BUILD_STATIC_LIBRARY)
-
-### Binder service library ###
-########################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libwpa_binder
+LOCAL_MODULE := libwpa_hidl
LOCAL_CPPFLAGS := $(L_CPPFLAGS)
LOCAL_CFLAGS := $(L_CFLAGS)
LOCAL_C_INCLUDES := $(INCLUDES)
LOCAL_SRC_FILES := \
- binder/binder.cpp \
- binder/binder_manager.cpp \
- binder/iface.cpp \
- binder/network.cpp \
- binder/supplicant.cpp
+ hidl/hidl.cpp \
+ hidl/hidl_manager.cpp \
+ hidl/iface.cpp \
+ hidl/network.cpp \
+ hidl/supplicant.cpp
LOCAL_SHARED_LIBRARIES := \
- libbinder \
+ android.hardware.wifi@1.0 \
+ libhidl \
+ libhwbinder \
libutils
-LOCAL_STATIC_LIBRARIES := libwpa_binder_interface
include $(BUILD_STATIC_LIBRARY)
-
-endif # BINDER == y
+endif # WPA_SUPPLICANT_USE_HIDL == y