From 0d21e2161f8542db0a54bf80b74b7fd33afef6f6 Mon Sep 17 00:00:00 2001 From: Laurent Tu Date: Tue, 2 Oct 2012 15:33:48 -0700 Subject: [PATCH] Remove checkPermission() call in getAllProviders(). getAllProviders() should return all locators, including those not allowed or not enabled (according to the existing javadoc, at least). The checkPermission() call prevented this behavior by throwing a security exception. We restore the previous behavior by removing the call. Bug: 6950369 Change-Id: I0c6bc676d4c4db482bb68f1ab7fa5c93675118b4 --- services/java/com/android/server/LocationManagerService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 2197e3122269c..ae95c4c00882c 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -645,12 +645,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run /** * Returns all providers by name, including passive, but excluding - * fused. + * fused, also including ones that are not permitted to + * be accessed by the calling activity or are currently disabled. */ @Override public List getAllProviders() { - checkPermission(); - ArrayList out; synchronized (mLock) { out = new ArrayList(mProviders.size());