Build automotive hals with VNDK.

Bug: 37342627
Test: cd hardware/interfaces/automotive &&
BOARD_VNDK_VERSION=current mma -j64 -k
Change-Id: I89e9af8a5fded3a31eedb9942cfba8e8d9614f53
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 01b5e7b..91515ab 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -55,4 +55,8 @@
 $(call add-clean-step, rm -rf $(OUT)/soong/.intermediates/)
 $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
 $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
-$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
\ No newline at end of file
+$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*)
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
index 6d3e902..3e3ff2c 100644
--- a/automotive/vehicle/2.0/default/Android.bp
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -30,12 +30,14 @@
 
 cc_library_headers {
     name: "vhal_v2_0_common_headers",
+    vendor: true,
     export_include_dirs: ["common/include/vhal_v2_0"],
 }
 
 // Vehicle reference implementation lib
 cc_library_static {
     name: "android.hardware.automotive.vehicle@2.0-manager-lib",
+    vendor: true,
     defaults: ["vhal_v2_0_defaults"],
     srcs: [
         "common/src/SubscriptionManager.cpp",
@@ -50,6 +52,7 @@
 
 cc_library_shared {
     name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
+    vendor: true,
     static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
     export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
 }
@@ -57,6 +60,7 @@
 // Vehicle default VehicleHAL implementation
 cc_library_static {
     name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+    vendor: true,
     defaults: ["vhal_v2_0_defaults"],
     srcs: [
         "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
@@ -79,6 +83,7 @@
 
 cc_test {
     name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
+    vendor: true,
     defaults: ["vhal_v2_0_defaults"],
     whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
     srcs: [
@@ -95,7 +100,7 @@
     name: "android.hardware.automotive.vehicle@2.0-service",
     defaults: ["vhal_v2_0_defaults"],
     init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
-    proprietary: true,
+    vendor: true,
     relative_install_path: "hw",
     srcs: ["VehicleService.cpp"],
     shared_libs: [
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
index 7d68f9e..ec35200 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
@@ -15,6 +15,7 @@
 // Vehicle HAL Protobuf library
 cc_library_static {
     name: "android.hardware.automotive.vehicle@2.0-libproto-native",
+    vendor: true,
     proto: {
         export_proto_headers: true,
         type: "lite",
diff --git a/automotive/vehicle/2.1/default/Android.bp b/automotive/vehicle/2.1/default/Android.bp
index 0697767..f6743f2 100644
--- a/automotive/vehicle/2.1/default/Android.bp
+++ b/automotive/vehicle/2.1/default/Android.bp
@@ -24,6 +24,7 @@
 // Vehicle reference implementation lib
 cc_library_static {
     name: "android.hardware.automotive.vehicle@2.1-manager-lib",
+    vendor: true,
     defaults: ["vhal_v2_1_defaults"],
     srcs: [
         "common/src/Obd2SensorStore.cpp",
@@ -36,6 +37,7 @@
 // Vehicle default VehicleHAL implementation
 cc_library_static {
     name: "android.hardware.automotive.vehicle@2.1-default-impl-lib",
+    vendor: true,
     defaults: ["vhal_v2_1_defaults"],
     srcs: [
         "impl/vhal_v2_1/EmulatedVehicleHal.cpp",
@@ -65,7 +67,7 @@
     name: "android.hardware.automotive.vehicle@2.1-service",
     defaults: ["vhal_v2_1_defaults"],
     init_rc: ["android.hardware.automotive.vehicle@2.1-service.rc"],
-    proprietary: true,
+    vendor: true,
     relative_install_path: "hw",
     srcs: ["service.cpp"],
     whole_static_libs: ["android.hardware.automotive.vehicle@2.0-libproto-native"],