summaryrefslogtreecommitdiffstats
path: root/include/hardware/fused_location.h
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2015-04-12 21:24:48 -0700
committerDavid Christie <dnchrist@google.com>2015-04-13 18:47:29 -0700
commit4b49035055487058cb0f82db6eb8b3ec740934d8 (patch)
tree0ce4d9a9120ceb6b716b3ccdf3e85eb303845843 /include/hardware/fused_location.h
parent5cf80e50033cbb2be14dbee1b97ae5ded648b252 (diff)
downloadhardware_libhardware-4b49035055487058cb0f82db6eb8b3ec740934d8.zip
hardware_libhardware-4b49035055487058cb0f82db6eb8b3ec740934d8.tar.gz
hardware_libhardware-4b49035055487058cb0f82db6eb8b3ec740934d8.tar.bz2
Add ability to flush FLP HAL batched locations buffer.
Currently GmsCore has to guess how many locations to retrieve based on requested frequency and then demux the output looking for timestamps (that aren't monotonically increasing). This capability gives GmsCore a more graceful solution. Change-Id: If2d054c09efc98e33e357796bbfcd37c91b24ec8
Diffstat (limited to 'include/hardware/fused_location.h')
-rw-r--r--include/hardware/fused_location.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hardware/fused_location.h b/include/hardware/fused_location.h
index 62cfee8..73360a1 100644
--- a/include/hardware/fused_location.h
+++ b/include/hardware/fused_location.h
@@ -425,6 +425,15 @@ typedef struct {
* Get a pointer to extension information.
*/
const void* (*get_extension)(const char* name);
+
+ /**
+ * Retrieve all batched locations currently stored and clear the buffer.
+ * flp_location_callback MUST be called in response, even if there are
+ * no locations to flush (in which case num_locations should be 0).
+ * Subsequent calls to get_batched_location or flush_batched_locations
+ * should not return any of the locations returned in this call.
+ */
+ void (*flush_batched_locations)();
} FlpLocationInterface;
struct flp_device_t {