diff options
author | David Christie <dnchrist@google.com> | 2015-04-12 21:24:48 -0700 |
---|---|---|
committer | David Christie <dnchrist@google.com> | 2015-04-13 18:47:29 -0700 |
commit | 4b49035055487058cb0f82db6eb8b3ec740934d8 (patch) | |
tree | 0ce4d9a9120ceb6b716b3ccdf3e85eb303845843 /include | |
parent | 5cf80e50033cbb2be14dbee1b97ae5ded648b252 (diff) | |
download | hardware_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')
-rw-r--r-- | include/hardware/fused_location.h | 9 |
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 { |