summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-09-13 13:20:59 -0700
committerVictoria Lease <violets@google.com>2012-09-13 14:17:41 -0700
commit4fab68b5324e1f9b6765cdc33e66d1f074623dc2 (patch)
tree96d99f6794718101b1cbb52c72af154d2b0790e9 /location
parentaefd73d2b9f17a06f05346f302db1e393a7ece19 (diff)
downloadframeworks_base-4fab68b5324e1f9b6765cdc33e66d1f074623dc2.zip
frameworks_base-4fab68b5324e1f9b6765cdc33e66d1f074623dc2.tar.gz
frameworks_base-4fab68b5324e1f9b6765cdc33e66d1f074623dc2.tar.bz2
Require ACCESS_FINE_LOCATION for Geofence use.
Bug: 7153226 Change-Id: I49236379e739fcda66bbc9a31cfdca9a87122aec
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/LocationManager.java27
1 files changed, 22 insertions, 5 deletions
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index bef363b..b127b53 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -994,6 +994,12 @@ public class LocationManager {
* <p> Internally, this method uses both {@link #NETWORK_PROVIDER}
* and {@link #GPS_PROVIDER}.
*
+ * <p>Before API version 17, this method could be used with
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
+ * From API version 17 and onwards, this method requires
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission.
+ *
* @param latitude the latitude of the central point of the
* alert region
* @param longitude the longitude of the central point of the
@@ -1005,7 +1011,8 @@ public class LocationManager {
* @param intent a PendingIntent that will be used to generate an Intent to
* fire when entry to or exit from the alert region is detected
*
- * @throws SecurityException if no suitable permission is present
+ * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+ * permission is not present
*
* @deprecated Use {@link LocationRequest} and {@link Geofence} instead
*/
@@ -1055,7 +1062,8 @@ public class LocationManager {
*
* @throws IllegalArgumentException if fence is null
* @throws IllegalArgumentException if intent is null
- * @throws SecurityException if no suitable permission is present
+ * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+ * permission is not present
*/
public void addGeofence(LocationRequest request, Geofence fence, PendingIntent intent) {
checkPendingIntent(intent);
@@ -1071,11 +1079,18 @@ public class LocationManager {
/**
* Removes the proximity alert with the given PendingIntent.
*
+ * <p>Before API version 17, this method could be used with
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
+ * From API version 17 and onwards, this method requires
+ * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission.
+ *
* @param intent the PendingIntent that no longer needs to be notified of
* proximity alerts
*
* @throws IllegalArgumentException if intent is null
- * @throws SecurityException if no suitable permission is present
+ * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+ * permission is not present
*
* @deprecated Use {@link LocationRequest} and {@link Geofence} instead
*/
@@ -1102,7 +1117,8 @@ public class LocationManager {
*
* @throws IllegalArgumentException if fence is null
* @throws IllegalArgumentException if intent is null
- * @throws SecurityException if no suitable permission is present
+ * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+ * permission is not present
*/
public void removeGeofence(Geofence fence, PendingIntent intent) {
checkPendingIntent(intent);
@@ -1122,7 +1138,8 @@ public class LocationManager {
* @param intent a pending intent previously passed to {@link #addGeofence}
*
* @throws IllegalArgumentException if intent is null
- * @throws SecurityException if no suitable permission is present
+ * @throws SecurityException if {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+ * permission is not present
*/
public void removeAllGeofences(PendingIntent intent) {
checkPendingIntent(intent);