From fff30439cafb737eb54de807caab4fb61432f2cc Mon Sep 17 00:00:00 2001 From: David Christie Date: Sun, 12 Apr 2015 21:26:02 -0700 Subject: 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: Ie1d71615f699bc0d3c63f8b80aa7b40b9971cf96 --- .../java/com/android/location/provider/FusedLocationHardware.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'location/lib') diff --git a/location/lib/java/com/android/location/provider/FusedLocationHardware.java b/location/lib/java/com/android/location/provider/FusedLocationHardware.java index cbe404b7..480a18c 100644 --- a/location/lib/java/com/android/location/provider/FusedLocationHardware.java +++ b/location/lib/java/com/android/location/provider/FusedLocationHardware.java @@ -174,6 +174,14 @@ public final class FusedLocationHardware { } } + public void flushBatchedLocations() { + try { + mLocationHardware.flushBatchedLocations(); + } catch(RemoteException e) { + Log.e(TAG, "RemoteException at flushBatchedLocations"); + } + } + public boolean supportsDiagnosticDataInjection() { try { return mLocationHardware.supportsDiagnosticDataInjection(); -- cgit v1.1