summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Tu <laurentt@google.com>2012-10-02 15:33:48 -0700
committerLaurent Tu <laurentt@google.com>2012-10-02 16:02:23 -0700
commit0d21e2161f8542db0a54bf80b74b7fd33afef6f6 (patch)
tree25fef64e1752d9e2a2b338fcf8faa46a73d4836b
parent57e6203457cedbc6f4bf8a45635862a3eb717e9f (diff)
downloadframeworks_base-0d21e2161f8542db0a54bf80b74b7fd33afef6f6.zip
frameworks_base-0d21e2161f8542db0a54bf80b74b7fd33afef6f6.tar.gz
frameworks_base-0d21e2161f8542db0a54bf80b74b7fd33afef6f6.tar.bz2
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
-rw-r--r--services/java/com/android/server/LocationManagerService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 2197e31..ae95c4c 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<String> getAllProviders() {
- checkPermission();
-
ArrayList<String> out;
synchronized (mLock) {
out = new ArrayList<String>(mProviders.size());