Allocator service uses vintf_fragment. am: 73e40c95f4
am: 6f766e6d2e
Change-Id: I074be3edb011dc9dc5a0b797c2b3601cf2e06362
diff --git a/transport/Android.bp b/transport/Android.bp
index 9216cd1..5b0c11c 100644
--- a/transport/Android.bp
+++ b/transport/Android.bp
@@ -78,20 +78,3 @@
},
},
}
-
-// deprecated/legacy (already removed in mainline Android)
-// use android-hidl-base-V1-0-java instead!
-java_library_static {
- name: "android.hidl.base-V1.0-java-static",
- no_framework_libs: true,
- defaults: ["hidl-java-module-defaults"],
- srcs: [":android.hidl.base-V1.0-java_gen_java"],
- libs: [
- "hwbinder",
- ],
- product_variables: {
- pdk: {
- enabled: false,
- },
- },
-}
\ No newline at end of file
diff --git a/transport/HidlTransportUtils.cpp b/transport/HidlTransportUtils.cpp
index eda9b8a..4e952eb 100644
--- a/transport/HidlTransportUtils.cpp
+++ b/transport/HidlTransportUtils.cpp
@@ -16,16 +16,25 @@
#include <hidl/HidlTransportUtils.h>
+#include <android/hidl/base/1.0/IBase.h>
+
namespace android {
namespace hardware {
namespace details {
-Return<bool> canCastInterface(::android::hidl::base::V1_0::IBase* interface,
- const char* castTo, bool emitError) {
+using ::android::hidl::base::V1_0::IBase;
+
+Return<bool> canCastInterface(IBase* interface, const char* castTo, bool emitError) {
if (interface == nullptr) {
return false;
}
+ // b/68217907
+ // Every HIDL interface is a base interface.
+ if (std::string(IBase::descriptor) == castTo) {
+ return true;
+ }
+
bool canCast = false;
auto chainRet = interface->interfaceChain([&](const hidl_vec<hidl_string> &types) {
for (size_t i = 0; i < types.size(); i++) {
@@ -46,7 +55,7 @@
return canCast;
}
-std::string getDescriptor(::android::hidl::base::V1_0::IBase* interface) {
+std::string getDescriptor(IBase* interface) {
std::string myDescriptor{};
auto ret = interface->interfaceDescriptor([&](const hidl_string &types) {
myDescriptor = types.c_str();
diff --git a/transport/current.txt b/transport/current.txt
index 958d679..0251824 100644
--- a/transport/current.txt
+++ b/transport/current.txt
@@ -15,3 +15,7 @@
# HALs released in Android O-MR1
0b94dc876f749ed24a98f61c41d46ad75a27511163f1968a084213a33c684ef6 android.hidl.manager@1.1::IServiceManager
+
+# HALs released in Android P
+445da29052612c57db3a8504f6395814277dc3826ee0f166cc732031b35af496 android.hidl.memory.block@1.0::types
+2e19301ceb87fb0696cd8268fab9c41f95d23c7392d35bc575daaa6eb32807eb android.hidl.memory.token@1.0::IMemoryToken
diff --git a/vintfdata/manifest.xml b/vintfdata/manifest.xml
index 3fc2067..66f5bd0 100644
--- a/vintfdata/manifest.xml
+++ b/vintfdata/manifest.xml
@@ -80,6 +80,16 @@
<instance>vr</instance>
</interface>
</hal>
+ <hal>
+ <name>android.hardware.health</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IHealth</name>
+ <!-- The backup instance provided by healthd. -->
+ <instance>backup</instance>
+ </interface>
+ </hal>
<hal format="native">
<name>netutils-wrapper</name>
<!--
diff --git a/vintfdata/manifest_healthd_exclude.xml b/vintfdata/manifest_healthd_exclude.xml
new file mode 100644
index 0000000..b4060f0
--- /dev/null
+++ b/vintfdata/manifest_healthd_exclude.xml
@@ -0,0 +1,15 @@
+<!--
+ Include this file to DEVICE_FRAMEWORK_MANIFEST_FILE to disable
+ having an healthd on the device which is not needed if you have
+ an alternative implementation like the following:
+ (1) Device has android.hardware.health@2.0-service.override
+ (2) Device has android.hardware.health@2.0-service.<device>, which
+ contains the following:
+ overrides: ["healthd"]
+-->
+<manifest version="1.0" type="framework">
+ <hal format="hidl" override="true">
+ <name>android.hardware.health</name>
+ <transport>hwbinder</transport>
+ </hal>
+</manifest>