diff options
author | Tom O'Neill <tomo@google.com> | 2013-09-11 11:03:03 -0700 |
---|---|---|
committer | Tom O'Neill <tomo@google.com> | 2013-09-11 11:03:03 -0700 |
commit | d5759437eeb3137e4a05471ff0f4681c0254e81a (patch) | |
tree | 0d22df7aa8d52ead9ef9da0f417fe43bb70814e7 /services | |
parent | e91a3f5229405b39a3ba59aa0a3e44527eef063e (diff) | |
download | frameworks_base-d5759437eeb3137e4a05471ff0f4681c0254e81a.zip frameworks_base-d5759437eeb3137e4a05471ff0f4681c0254e81a.tar.gz frameworks_base-d5759437eeb3137e4a05471ff0f4681c0254e81a.tar.bz2 |
Improve some javadoc related to isProviderEnabled() apis
- LocationManager.isProviderEnabled() no longer throws SecurityException:
the caller could already circumvent the permission check by calling
Secure.isLocationProviderEnabled()
Change-Id: I5abd04264299671ed35ce4594b5be46d86378767
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index de29155..f70f4db 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -1773,8 +1773,12 @@ public class LocationManagerService extends ILocationManager.Stub { @Override public boolean isProviderEnabled(String provider) { + // TODO: remove this check in next release, see b/10696351 checkResolutionLevelIsSufficientForProviderUse(getCallerAllowedResolutionLevel(), provider); + + // Fused provider is accessed indirectly via criteria rather than the provider-based APIs, + // so we discourage its use if (LocationManager.FUSED_PROVIDER.equals(provider)) return false; int uid = Binder.getCallingUid(); |