Add host support to misc legacy AIDL libs
Test: Compiles, atest --host
Change-Id: I1eb1fb85ee7bff2b60254314b974b371047e4c1f
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index 63d87da..9ecf072 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -60,11 +60,15 @@
//
// Currently, these are only on system android (not vendor, not host)
// TODO(b/183654927) - move these into separate libraries
-libbinder_device_interface_sources = [
- "IPermissionController.cpp",
- "PermissionCache.cpp",
- "PermissionController.cpp",
-]
+
+filegroup {
+ name: "libbinder_device_interface_sources",
+ srcs: [
+ "IPermissionController.cpp",
+ "PermissionCache.cpp",
+ "PermissionController.cpp",
+ ],
+}
cc_library {
name: "libbinder",
@@ -126,19 +130,20 @@
"TextOutput.cpp",
"Utils.cpp",
":libbinder_aidl",
+ ":libbinder_device_interface_sources",
],
target: {
android: {
- srcs: libbinder_device_interface_sources,
-
// NOT static to keep the wire protocol unfrozen
static: {
enabled: false,
},
},
vendor: {
- exclude_srcs: libbinder_device_interface_sources,
+ exclude_srcs: [
+ ":libbinder_device_interface_sources",
+ ],
},
darwin: {
enabled: false,
@@ -366,6 +371,7 @@
cc_library {
name: "libbatterystats_aidl",
+ host_supported: true,
srcs: [
"IBatteryStats.cpp",
],
@@ -378,6 +384,7 @@
cc_library {
name: "libprocessinfoservice_aidl",
+ host_supported: true,
srcs: [
"IProcessInfoService.cpp",
"ProcessInfoService.cpp",
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index ea2f8d2..44b7ac6 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -165,7 +165,7 @@
}
}
-#if !defined(__ANDROID_VNDK__) && defined(__ANDROID__)
+#if !defined(__ANDROID_VNDK__)
// IPermissionController is not accessible to vendors
bool checkCallingPermission(const String16& permission)