From b870dbf86bd47c750d2a5350a83ec245396578ee Mon Sep 17 00:00:00 2001 From: David Christie Date: Mon, 22 Jun 2015 12:42:53 -0700 Subject: Fix privacy leaks in LocationManager -Register for listener for permission changes and stop request immediately if client loses permission. -Also remove permission requirement to remove geofences and clean up permission annotations. Bug: 21903866 Change-Id: I7e028b6b2ca5b21f25fcbba5de86dfb55caff872 --- location/java/android/location/LocationManager.java | 4 ---- 1 file changed, 4 deletions(-) (limited to 'location') diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index b09f216..2c19324 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -892,7 +892,6 @@ public class LocationManager { * @param listener listener object that no longer needs location updates * @throws IllegalArgumentException if listener is null */ - @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void removeUpdates(LocationListener listener) { checkListener(listener); String packageName = mContext.getPackageName(); @@ -1055,7 +1054,6 @@ public class LocationManager { * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION} * permission is not present */ - @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void removeProximityAlert(PendingIntent intent) { checkPendingIntent(intent); String packageName = mContext.getPackageName(); @@ -1083,7 +1081,6 @@ public class LocationManager { * * @hide */ - @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void removeGeofence(Geofence fence, PendingIntent intent) { checkPendingIntent(intent); checkGeofence(fence); @@ -1107,7 +1104,6 @@ public class LocationManager { * * @hide */ - @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void removeAllGeofences(PendingIntent intent) { checkPendingIntent(intent); String packageName = mContext.getPackageName(); -- cgit v1.1