health: fix depending on multiple versions of the same aidl_interface

When health aidl_interface version updraged, some libraries are
depending on V1 and android.hardware.health-translate-ndk at the
same time. It will cause multiple versions depending if
android.hardware.health-translate-ndk is depending on new version.
version.

Fork android.hardware.health-translate-ndk generate two versions,
so that other libraries can depend on the same aidl_interface,
to avoid multiple versions depending.

Bug: 251425963
Test: m
Change-Id: I0641e9f6c1445ee2549b956012ebb35eb1f8ac97
Signed-off-by: Jack Wu <wjack@google.com>
This commit is contained in:
Jack Wu 2023-01-10 14:56:13 +08:00
parent b490783ad7
commit 0edf57e04b

View file

@ -46,8 +46,8 @@ aidl_interface {
}
cc_library {
name: "android.hardware.health-translate-ndk",
cc_defaults {
name: "android.hardware.health-translate-ndk_defaults",
vendor_available: true,
recovery_available: true,
host_supported: true,
@ -55,7 +55,6 @@ cc_library {
shared_libs: [
"libbinder_ndk",
"libhidlbase",
"android.hardware.health-V1-ndk",
"android.hardware.health@2.0",
"android.hardware.health@2.1",
],
@ -71,6 +70,23 @@ cc_library {
},
}
cc_library {
name: "android.hardware.health-translate-ndk",
defaults: ["android.hardware.health-translate-ndk_defaults"],
shared_libs: [
"android.hardware.health-V1-ndk",
],
}
// TODO(b/251425963): remove when android.hardware.health is upgraded to V2.
cc_library {
name: "android.hardware.health-translate-V1-ndk",
defaults: ["android.hardware.health-translate-ndk_defaults"],
shared_libs: [
"android.hardware.health-V1-ndk",
],
}
java_library {
name: "android.hardware.health-translate-java",
srcs: ["android/hardware/health/Translate.java"],