summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorTom O'Neill <tomo@google.com>2014-02-28 17:38:31 -0800
committerTom O'Neill <tomo@google.com>2014-02-28 17:38:31 -0800
commitafecea18054c457cbd55d1ed9c023f2c2aa3726b (patch)
tree8db4e4553a2c8b61d32572d62ed8f3f103ba4c5a /location
parent8a78a807097397ccd9c6ea20868f71c7ee19ef1d (diff)
downloadframeworks_base-afecea18054c457cbd55d1ed9c023f2c2aa3726b.zip
frameworks_base-afecea18054c457cbd55d1ed9c023f2c2aa3726b.tar.gz
frameworks_base-afecea18054c457cbd55d1ed9c023f2c2aa3726b.tar.bz2
Seeing if a provider is enabled doesn't require special permissions
- Bug: 10696351 Change-Id: I4f1612ce10587728e71277587144fdcb59445b3f
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/LocationManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index ced3ec9..36778aa 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -28,6 +28,7 @@ import android.os.Message;
import android.util.Log;
+import java.lang.SecurityException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -1104,13 +1105,18 @@ public class LocationManager {
* unless they depend on provider-specific APIs such as
* {@link #requestLocationUpdates(String, long, float, LocationListener)}.
*
+ * <p>
+ * Before API version 20, this method would throw {@link SecurityException}
+ * if the location permissions were not sufficient to use the specified
+ * provider.
+ *
* @param provider the name of the provider
* @return true if the provider exists and is enabled
*
* @throws IllegalArgumentException if provider is null
- * @throws SecurityException if no suitable permission is present
*/
public boolean isProviderEnabled(String provider) {
+ // STOPSHIP: finalize API version number in javadoc
checkProvider(provider);
try {