Merge "Dynamic sensor manager -- implementation of basic sensor daemon" into oc-dev
diff --git a/include/hardware/gralloc1.h b/include/hardware/gralloc1.h
index e97126e..4845010 100644
--- a/include/hardware/gralloc1.h
+++ b/include/hardware/gralloc1.h
@@ -36,10 +36,19 @@
* allocate may be NULL, which instructs the device to report whether the
* given allocation is possible or not. */
GRALLOC1_CAPABILITY_TEST_ALLOCATE = 1,
+
/* If this capability is supported, then the implementation supports
* allocating buffers with more than one image layer. */
GRALLOC1_CAPABILITY_LAYERED_BUFFERS = 2,
- GRALLOC1_LAST_CAPABILITY = 2,
+
+ /* If this capability is supported, then the implementation always closes
+ * and deletes a buffer handle whenever the last reference is removed.
+ *
+ * Supporting this capability is strongly recommended. It will become
+ * mandatory in future releases. */
+ GRALLOC1_CAPABILITY_RELEASE_IMPLY_DELETE = 3,
+
+ GRALLOC1_LAST_CAPABILITY = 3,
} gralloc1_capability_t;
typedef enum {
@@ -747,6 +756,12 @@
* referring to a particular backing store is freed, that backing store should
* also be freed.
*
+ * When GRALLOC1_CAPABILITY_RELEASE_IMPLY_DELETE is supported,
+ * native_handle_close and native_handle_delete must always be called by the
+ * implementation whenever the last reference is removed. Otherwise, a call
+ * to release() will be followed by native_handle_close and native_handle_delete
+ * by the caller when the buffer is not allocated locally through allocate().
+ *
* Parameters:
* buffer - the buffer from which a reference should be removed
*
diff --git a/modules/audio/Android.bp b/modules/audio/Android.bp
index bd23b03..84daead 100644
--- a/modules/audio/Android.bp
+++ b/modules/audio/Android.bp
@@ -25,7 +25,6 @@
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
- "libcutils",
],
cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
}
@@ -43,7 +42,6 @@
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
- "libcutils",
],
cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
}
@@ -57,7 +55,6 @@
srcs: ["audio_policy.c"],
shared_libs: [
"liblog",
- "libcutils",
],
cflags: ["-Wall", "-Werror", "-Wno-unused-parameter"],
}
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index 55a5c3b..43d13a9 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -23,7 +23,7 @@
#include <stdint.h>
#include <sys/time.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <hardware/hardware.h>
#include <system/audio.h>