diff --git a/automotive/vehicle/aidl/aidl_test/Android.bp b/automotive/vehicle/aidl/aidl_test/Android.bp index 5284a0a8e1..cb92c6bfa3 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "android.hardware.automotive.vehicle@2.0", "libgtest", "libgmock", diff --git a/automotive/vehicle/aidl/impl/default_config/Android.bp b/automotive/vehicle/aidl/impl/default_config/Android.bp index 0feaf23a73..7a98b6465a 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: ["VehicleHalUtils"], + static_libs: ["VehicleHalUtilsVendor"], header_libs: ["VehicleHalTestUtilHeaders"], - export_static_lib_headers: ["VehicleHalUtils"], + export_static_lib_headers: ["VehicleHalUtilsVendor"], 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 771472c8c1..0c4a3a43d4 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 ab223d3f94..e6c4ee9955 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 ac8db44e59..58f0e9848d 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 dcd9208cab..49f76718ee 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "FakeVehicleHalValueGenerators", "FakeObd2Frame", "FakeUserHal", @@ -47,5 +47,5 @@ cc_defaults { shared_libs: [ "libjsoncpp", ], - export_static_lib_headers: ["VehicleHalUtils"], + export_static_lib_headers: ["VehicleHalUtilsVendor"], } 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 90d1516a21..9f679bcf11 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 c1cee84e63..c21ad535c5 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], - export_static_lib_headers: ["VehicleHalUtils"], + export_static_lib_headers: ["VehicleHalUtilsVendor"], } 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 55b8c9399e..a16185b5e2 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", - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], 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 2e955315cd..16891029f7 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: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], - export_static_lib_headers: ["VehicleHalUtils"], + export_static_lib_headers: ["VehicleHalUtilsVendor"], } 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 7d0a534b85..1471ea6396 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", - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 7670c25418..6209880958 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", - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], defaults: ["VehicleHalDefaults"], - export_static_lib_headers: ["VehicleHalUtils"], + export_static_lib_headers: ["VehicleHalUtilsVendor"], } cc_test { @@ -51,7 +51,7 @@ cc_test { static_libs: [ "VehicleHalProtoMessageConverter", "VehicleHalProtos", - "VehicleHalUtils", + "VehicleHalUtilsVendor", "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 ace505d88c..88713f1245 100644 --- a/automotive/vehicle/aidl/impl/utils/common/Android.bp +++ b/automotive/vehicle/aidl/impl/utils/common/Android.bp @@ -19,7 +19,7 @@ package { } cc_library { - name: "VehicleHalUtils", + name: "VehicleHalUtilsVendor", srcs: ["src/*.cpp"], vendor: true, local_include_dirs: ["include"], @@ -27,6 +27,33 @@ cc_library { 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 250b33135b..bcb3c8d512 100644 --- a/automotive/vehicle/aidl/impl/utils/common/test/Android.bp +++ b/automotive/vehicle/aidl/impl/utils/common/test/Android.bp @@ -19,11 +19,11 @@ package { } cc_test { - name: "VehicleHalVehicleUtilsTest", + name: "VehicleHalVehicleUtilsVendorTest", srcs: ["*.cpp"], vendor: true, static_libs: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", "libgtest", "libgmock", ], diff --git a/automotive/vehicle/aidl/impl/vhal/Android.bp b/automotive/vehicle/aidl/impl/vhal/Android.bp index 49f48f7aa8..295cbb746b 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", - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], header_libs: [ "IVehicleHardware", @@ -58,7 +58,7 @@ cc_library { "src/SubscriptionManager.cpp", ], static_libs: [ - "VehicleHalUtils", + "VehicleHalUtilsVendor", ], header_libs: [ "IVehicleHardware", diff --git a/automotive/vehicle/aidl/impl/vhal/test/Android.bp b/automotive/vehicle/aidl/impl/vhal/test/Android.bp index 7122aa5230..d89f2c152d 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", - "VehicleHalUtils", + "VehicleHalUtilsVendor", "libgtest", "libgmock", ],