Merge changes from topic "libhardware_vndk"
am: 7d03020e96

Change-Id: I13dd1fafc3822d12e9403e467b8b3f803dd990b1
diff --git a/modules/audio/Android.bp b/modules/audio/Android.bp
index 84daead..a7467c2 100644
--- a/modules/audio/Android.bp
+++ b/modules/audio/Android.bp
@@ -23,6 +23,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["audio_hw.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
     ],
@@ -40,6 +41,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["audio_hw.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
     ],
@@ -53,6 +55,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["audio_policy.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
     ],
diff --git a/modules/consumerir/Android.bp b/modules/consumerir/Android.bp
index b139492..6ba37b6 100644
--- a/modules/consumerir/Android.bp
+++ b/modules/consumerir/Android.bp
@@ -17,6 +17,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["consumerir.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
     ],
diff --git a/modules/fingerprint/Android.bp b/modules/fingerprint/Android.bp
index ba749e4..a824608 100644
--- a/modules/fingerprint/Android.bp
+++ b/modules/fingerprint/Android.bp
@@ -17,5 +17,6 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["fingerprint.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: ["liblog"],
 }
diff --git a/modules/local_time/Android.bp b/modules/local_time/Android.bp
index 643afa5..153b7e4 100644
--- a/modules/local_time/Android.bp
+++ b/modules/local_time/Android.bp
@@ -26,6 +26,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["local_time_hw.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
         "libcutils",
diff --git a/modules/nfc/Android.bp b/modules/nfc/Android.bp
index 10dc2c1..b4bc9b1 100644
--- a/modules/nfc/Android.bp
+++ b/modules/nfc/Android.bp
@@ -17,6 +17,7 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["nfc_pn544_example.c"],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
     ],
diff --git a/modules/power/Android.bp b/modules/power/Android.bp
index f4c74ce..41ac45c 100644
--- a/modules/power/Android.bp
+++ b/modules/power/Android.bp
@@ -17,5 +17,9 @@
     relative_install_path: "hw",
     proprietary: true,
     srcs: ["power.c"],
+    header_libs: [
+        "libhardware_headers",
+        "libutils_headers",
+    ],
     shared_libs: ["liblog"],
 }
diff --git a/modules/radio/Android.bp b/modules/radio/Android.bp
index 01dc035..7f98f0d 100644
--- a/modules/radio/Android.bp
+++ b/modules/radio/Android.bp
@@ -23,6 +23,7 @@
         "-Wno-unused-parameter",
         "-Werror",
     ],
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "liblog",
         "libcutils",
diff --git a/modules/tv_input/Android.bp b/modules/tv_input/Android.bp
index 509198d..4d2369e 100644
--- a/modules/tv_input/Android.bp
+++ b/modules/tv_input/Android.bp
@@ -16,6 +16,7 @@
     name: "tv_input.default",
     relative_install_path: "hw",
     proprietary: true,
+    header_libs: ["libhardware_headers"],
     shared_libs: [
         "libcutils",
         "liblog",
diff --git a/modules/usbaudio/audio_hal.c b/modules/usbaudio/audio_hal.c
index df4bc0f..e93396f 100644
--- a/modules/usbaudio/audio_hal.c
+++ b/modules/usbaudio/audio_hal.c
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <sys/time.h>
+#include <unistd.h>
 
 #include <log/log.h>
 #include <cutils/list.h>
diff --git a/modules/vehicle/Android.mk b/modules/vehicle/Android.mk
index 9fd49da..34c943c 100644
--- a/modules/vehicle/Android.mk
+++ b/modules/vehicle/Android.mk
@@ -20,8 +20,8 @@
 
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_PROPRIETARY_MODULE := true
-LOCAL_C_INCLUDES := hardware/libhardware
 LOCAL_SRC_FILES := vehicle.c timeUtil.cpp
+LOCAL_HEADER_LIBRARIES := libhardware_headers
 LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
 LOCAL_MODULE_TAGS := optional
 
diff --git a/modules/vibrator/Android.bp b/modules/vibrator/Android.bp
index 3c4aebf..fdbfd61 100644
--- a/modules/vibrator/Android.bp
+++ b/modules/vibrator/Android.bp
@@ -19,7 +19,7 @@
     // hw/<VIBRATOR_HARDWARE_MODULE_ID>.default.so
     relative_install_path: "hw",
     proprietary: true,
-    include_dirs: ["hardware/libhardware"],
+    header_libs: ["libhardware_headers"],
     srcs: ["vibrator.c"],
     shared_libs: ["liblog"],
 }
diff --git a/modules/vr/Android.mk b/modules/vr/Android.mk
index e04c0da..0305745 100644
--- a/modules/vr/Android.mk
+++ b/modules/vr/Android.mk
@@ -20,6 +20,7 @@
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_PROPRIETARY_MODULE := true
 LOCAL_SRC_FILES := vr.c
+LOCAL_HEADER_LIBRARIES := libhardware_headers
 LOCAL_SHARED_LIBRARIES := libcutils
 LOCAL_MODULE_TAGS := optional
 LOCAL_CFLAGS += -Wno-unused-parameter