summaryrefslogtreecommitdiffstats
path: root/location/lib/java
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-10-31 15:54:05 -0700
committerVictoria Lease <violets@google.com>2012-11-01 13:55:36 -0700
commit779b77455fc51382ecafa210b8a805d2a616da55 (patch)
treec8dbdaf9a7dc45be92fbef534f2ead9cd4b13039 /location/lib/java
parent03f7ebfeaadb3f03c9a9a6405276fb702ad11fe1 (diff)
downloadframeworks_base-779b77455fc51382ecafa210b8a805d2a616da55.zip
frameworks_base-779b77455fc51382ecafa210b8a805d2a616da55.tar.gz
frameworks_base-779b77455fc51382ecafa210b8a805d2a616da55.tar.bz2
fix NLP for COARSE applications, build FLP with SDK
In this commit, we provide a means for unbundled location providers to attach an EXTRA_NO_GPS_LOCATION to the Locations that they report. We also build FusedLocation against the SDK rather than the internal tree. Used in conjunction with I394ded497b8de40d1f85618bff282553cdf378cb to fix NLP for applications with only ACCESS_COARSE_LOCATION permission. Bug: 7453355 Change-Id: Ie696f7abff9ef5237740ab87fe9f537a1c812c54
Diffstat (limited to 'location/lib/java')
-rw-r--r--location/lib/java/com/android/location/provider/LocationProviderBase.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/location/lib/java/com/android/location/provider/LocationProviderBase.java b/location/lib/java/com/android/location/provider/LocationProviderBase.java
index b0e5d2c..8a5a739 100644
--- a/location/lib/java/com/android/location/provider/LocationProviderBase.java
+++ b/location/lib/java/com/android/location/provider/LocationProviderBase.java
@@ -23,6 +23,8 @@ import java.io.PrintWriter;
import android.content.Context;
import android.location.ILocationManager;
import android.location.Location;
+import android.location.LocationManager;
+import android.location.LocationRequest;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
@@ -58,6 +60,21 @@ public abstract class LocationProviderBase {
private final ProviderProperties mProperties;
private final IBinder mBinder;
+ /**
+ * Bundle key for a version of the location containing no GPS data.
+ * Allows location providers to flag locations as being safe to
+ * feed to LocationFudger.
+ */
+ public static final String EXTRA_NO_GPS_LOCATION = Location.EXTRA_NO_GPS_LOCATION;
+
+ /**
+ * Name of the Fused location provider.
+ *
+ * <p>This provider combines inputs for all possible location sources
+ * to provide the best possible Location fix.
+ */
+ public static final String FUSED_PROVIDER = LocationManager.FUSED_PROVIDER;
+
private final class Service extends ILocationProvider.Stub {
@Override
public void enable() {