summaryrefslogtreecommitdiffstats
path: root/packages/FusedLocation
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-09-16 12:33:15 -0700
committerVictoria Lease <violets@google.com>2012-09-21 13:45:41 -0700
commit09016ab4dd056a16809419d612cb865a14980880 (patch)
treee920e568aeac8e75b2f4b9e815047bf7c4a8f2af /packages/FusedLocation
parent537d47f510ce49acee09516ed5dde680d910ff94 (diff)
downloadframeworks_base-09016ab4dd056a16809419d612cb865a14980880.zip
frameworks_base-09016ab4dd056a16809419d612cb865a14980880.tar.gz
frameworks_base-09016ab4dd056a16809419d612cb865a14980880.tar.bz2
Do not use passive GPS data for COARSE only apps.
FusionEngine now attaches a secondary location that has never seen GPS data to its result. LocationFudger uses the GPS-less location so that COARSE apps never see data from the GPS provider. When the previous location is updated, the previous GPS-less location is carried over if the location update was GPS-only. Additionally, apps without FINE permission are not notified when GPS location changes, and any attempt to use GPS_PROVIDER without FINE permission is met by a stern SecurityException. Bug: 7153659 Change-Id: I12f26725782892038ce1133561e1908d91378a4a
Diffstat (limited to 'packages/FusedLocation')
-rw-r--r--packages/FusedLocation/src/com/android/location/fused/FusionEngine.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
index 1c22c7a..b83521a 100644
--- a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
+++ b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
@@ -302,6 +302,10 @@ public class FusionEngine implements LocationListener {
0.0, 360.0));
}
+ if (mNetworkLocation != null) {
+ fused.setExtraLocation(Location.EXTRA_NO_GPS_LOCATION, mNetworkLocation);
+ }
+
mFusedLocation = fused;
mCallback.reportLocation(mFusedLocation);