From 75d311d54eaf93b2df03dc0bb55eb9de2ea265c1 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 9 Feb 2022 12:01:43 -0800 Subject: [PATCH] Make VehicleHalUtils vendor available. Test: Presubmit Bug: 214635003 Change-Id: I402725599ec22574ed2bd5620e9b9328ff1800f4 --- automotive/vehicle/aidl/aidl_test/Android.bp | 2 +- automotive/vehicle/aidl/impl/Android.bp | 2 +- .../aidl/impl/default_config/Android.bp | 4 +-- .../aidl/impl/default_config/test/Android.bp | 2 +- .../impl/fake_impl/GeneratorHub/Android.bp | 2 +- .../fake_impl/GeneratorHub/test/Android.bp | 2 +- .../aidl/impl/fake_impl/hardware/Android.bp | 4 +-- .../impl/fake_impl/hardware/test/Android.bp | 2 +- .../aidl/impl/fake_impl/obd2frame/Android.bp | 4 +-- .../impl/fake_impl/obd2frame/test/Android.bp | 2 +- .../aidl/impl/fake_impl/userhal/Android.bp | 4 +-- .../impl/fake_impl/userhal/test/Android.bp | 2 +- .../utils/proto_message_converter/Android.bp | 6 ++-- .../vehicle/aidl/impl/utils/common/Android.bp | 31 ++----------------- .../aidl/impl/utils/common/test/Android.bp | 2 +- automotive/vehicle/aidl/impl/vhal/Android.bp | 4 +-- .../vehicle/aidl/impl/vhal/test/Android.bp | 2 +- 17 files changed, 25 insertions(+), 52 deletions(-) diff --git a/automotive/vehicle/aidl/aidl_test/Android.bp b/automotive/vehicle/aidl/aidl_test/Android.bp index cb92c6bfa3..5284a0a8e1 100644 --- a/automotive/vehicle/aidl/aidl_test/Android.bp +++ b/automotive/vehicle/aidl/aidl_test/Android.bp @@ -26,7 +26,7 @@ cc_test { "libhidlbase", ], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "android.hardware.automotive.vehicle@2.0", "libgtest", "libgmock", diff --git a/automotive/vehicle/aidl/impl/Android.bp b/automotive/vehicle/aidl/impl/Android.bp index 16b6fde178..d24a73902b 100644 --- a/automotive/vehicle/aidl/impl/Android.bp +++ b/automotive/vehicle/aidl/impl/Android.bp @@ -21,7 +21,7 @@ package { cc_defaults { name: "VehicleHalDefaults", static_libs: [ - "android-automotive-large-parcelable-vendor-lib", + "android-automotive-large-parcelable-lib", "android.hardware.automotive.vehicle-V1-ndk", "libmath", ], diff --git a/automotive/vehicle/aidl/impl/default_config/Android.bp b/automotive/vehicle/aidl/impl/default_config/Android.bp index 7a98b6465a..0feaf23a73 100644 --- a/automotive/vehicle/aidl/impl/default_config/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/Android.bp @@ -24,8 +24,8 @@ cc_library_headers { local_include_dirs: ["include"], export_include_dirs: ["include"], defaults: ["VehicleHalDefaults"], - static_libs: ["VehicleHalUtilsVendor"], + static_libs: ["VehicleHalUtils"], header_libs: ["VehicleHalTestUtilHeaders"], - export_static_lib_headers: ["VehicleHalUtilsVendor"], + export_static_lib_headers: ["VehicleHalUtils"], export_header_lib_headers: ["VehicleHalTestUtilHeaders"], } diff --git a/automotive/vehicle/aidl/impl/default_config/test/Android.bp b/automotive/vehicle/aidl/impl/default_config/test/Android.bp index 0c4a3a43d4..771472c8c1 100644 --- a/automotive/vehicle/aidl/impl/default_config/test/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/test/Android.bp @@ -24,7 +24,7 @@ cc_test { defaults: ["VehicleHalDefaults"], srcs: ["*.cpp"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "libgtest", ], header_libs: [ diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/Android.bp index e6c4ee9955..ab223d3f94 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/Android.bp @@ -26,7 +26,7 @@ cc_library { export_include_dirs: ["include"], defaults: ["VehicleHalDefaults"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "FakeObd2Frame", ], shared_libs: [ diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp index 58f0e9848d..ac8db44e59 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp @@ -24,7 +24,7 @@ cc_test { srcs: ["*.cpp"], defaults: ["VehicleHalDefaults"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "FakeVehicleHalValueGenerators", "FakeObd2Frame", ], diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp index 49f76718ee..dcd9208cab 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/Android.bp @@ -39,7 +39,7 @@ cc_defaults { ], export_header_lib_headers: ["IVehicleHardware"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "FakeVehicleHalValueGenerators", "FakeObd2Frame", "FakeUserHal", @@ -47,5 +47,5 @@ cc_defaults { shared_libs: [ "libjsoncpp", ], - export_static_lib_headers: ["VehicleHalUtilsVendor"], + export_static_lib_headers: ["VehicleHalUtils"], } diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp index 9f679bcf11..90d1516a21 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp @@ -29,7 +29,7 @@ cc_test { "VehicleHalTestUtilHeaders", ], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "FakeVehicleHardware", "FakeVehicleHalValueGenerators", "FakeObd2Frame", diff --git a/automotive/vehicle/aidl/impl/fake_impl/obd2frame/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/obd2frame/Android.bp index c21ad535c5..c1cee84e63 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/obd2frame/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/obd2frame/Android.bp @@ -26,7 +26,7 @@ cc_library { export_include_dirs: ["include"], defaults: ["VehicleHalDefaults"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], - export_static_lib_headers: ["VehicleHalUtilsVendor"], + export_static_lib_headers: ["VehicleHalUtils"], } diff --git a/automotive/vehicle/aidl/impl/fake_impl/obd2frame/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/obd2frame/test/Android.bp index a16185b5e2..55b8c9399e 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/obd2frame/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/obd2frame/test/Android.bp @@ -25,7 +25,7 @@ cc_test { defaults: ["VehicleHalDefaults"], static_libs: [ "FakeObd2Frame", - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], test_suites: ["device-tests"], } diff --git a/automotive/vehicle/aidl/impl/fake_impl/userhal/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/userhal/Android.bp index 16891029f7..2e955315cd 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/userhal/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/userhal/Android.bp @@ -26,7 +26,7 @@ cc_library { export_include_dirs: ["include"], defaults: ["VehicleHalDefaults"], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], - export_static_lib_headers: ["VehicleHalUtilsVendor"], + export_static_lib_headers: ["VehicleHalUtils"], } diff --git a/automotive/vehicle/aidl/impl/fake_impl/userhal/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/userhal/test/Android.bp index 1471ea6396..7d0a534b85 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/userhal/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/userhal/test/Android.bp @@ -25,7 +25,7 @@ cc_test { defaults: ["VehicleHalDefaults"], static_libs: [ "FakeUserHal", - "VehicleHalUtilsVendor", + "VehicleHalUtils", "libgtest", "libgmock", ], diff --git a/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/Android.bp b/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/Android.bp index 6209880958..7670c25418 100644 --- a/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/Android.bp +++ b/automotive/vehicle/aidl/impl/grpc/utils/proto_message_converter/Android.bp @@ -34,10 +34,10 @@ cc_library { shared_libs: ["libprotobuf-cpp-full"], static_libs: [ "VehicleHalProtos", - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], defaults: ["VehicleHalDefaults"], - export_static_lib_headers: ["VehicleHalUtilsVendor"], + export_static_lib_headers: ["VehicleHalUtils"], } cc_test { @@ -51,7 +51,7 @@ cc_test { static_libs: [ "VehicleHalProtoMessageConverter", "VehicleHalProtos", - "VehicleHalUtilsVendor", + "VehicleHalUtils", "libgtest", ], header_libs: ["VehicleHalDefaultConfig"], diff --git a/automotive/vehicle/aidl/impl/utils/common/Android.bp b/automotive/vehicle/aidl/impl/utils/common/Android.bp index 88713f1245..e5d9346da4 100644 --- a/automotive/vehicle/aidl/impl/utils/common/Android.bp +++ b/automotive/vehicle/aidl/impl/utils/common/Android.bp @@ -19,41 +19,14 @@ package { } cc_library { - name: "VehicleHalUtilsVendor", + name: "VehicleHalUtils", srcs: ["src/*.cpp"], - vendor: true, + vendor_available: true, local_include_dirs: ["include"], export_include_dirs: ["include"], defaults: ["VehicleHalDefaults"], } -// This is a non-vendor version for VehicleHalUtilsVendor. -cc_library { - name: "VehicleHalUtils", - srcs: ["src/*.cpp"], - local_include_dirs: ["include"], - export_include_dirs: ["include"], - static_libs: [ - "android-automotive-large-parcelable-lib", - "android.hardware.automotive.vehicle-V1-ndk", - "libmath", - ], - shared_libs: [ - "libbase", - "liblog", - "libutils", - ], - cflags: [ - "-Wall", - "-Wextra", - "-Werror", - "-Wthread-safety", - ], - defaults: [ - "android-automotive-large-parcelable-defaults", - ], -} - cc_library_headers { name: "VehicleHalUtilHeaders", export_include_dirs: ["include"], diff --git a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp index bcb3c8d512..5b41ff4df0 100644 --- a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp +++ b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp @@ -23,7 +23,7 @@ cc_test { srcs: ["*.cpp"], vendor: true, static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", "libgtest", "libgmock", ], diff --git a/automotive/vehicle/aidl/impl/vhal/Android.bp b/automotive/vehicle/aidl/impl/vhal/Android.bp index 295cbb746b..49f48f7aa8 100644 --- a/automotive/vehicle/aidl/impl/vhal/Android.bp +++ b/automotive/vehicle/aidl/impl/vhal/Android.bp @@ -33,7 +33,7 @@ cc_binary { static_libs: [ "DefaultVehicleHal", "FakeVehicleHardware", - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], header_libs: [ "IVehicleHardware", @@ -58,7 +58,7 @@ cc_library { "src/SubscriptionManager.cpp", ], static_libs: [ - "VehicleHalUtilsVendor", + "VehicleHalUtils", ], header_libs: [ "IVehicleHardware", diff --git a/automotive/vehicle/aidl/impl/vhal/test/Android.bp b/automotive/vehicle/aidl/impl/vhal/test/Android.bp index d89f2c152d..7122aa5230 100644 --- a/automotive/vehicle/aidl/impl/vhal/test/Android.bp +++ b/automotive/vehicle/aidl/impl/vhal/test/Android.bp @@ -24,7 +24,7 @@ cc_test { srcs: ["*.cpp"], static_libs: [ "DefaultVehicleHal", - "VehicleHalUtilsVendor", + "VehicleHalUtils", "libgtest", "libgmock", ],