summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-07-04 16:09:22 +0200
committerDanny Baumann <dannybaumann@web.de>2013-07-04 16:10:42 +0200
commit0f166de3b0555041fb4a49b4e319d3ffedf892a8 (patch)
treeb9c3844803a05833d1ce0da0e4eedf2c03616804 /services
parentcca622eedca3a40b80695b0e6cf570d41394e69d (diff)
downloadframeworks_base-0f166de3b0555041fb4a49b4e319d3ffedf892a8.zip
frameworks_base-0f166de3b0555041fb4a49b4e319d3ffedf892a8.tar.gz
frameworks_base-0f166de3b0555041fb4a49b4e319d3ffedf892a8.tar.bz2
Don't enable GPS if the requesting app is blacklisted.
This is transparent to the app, it just sees no location callbacks as before. It just avoids the additional unneeded battery drain. Change-Id: Iff98bcc3a4ff724aea8763e08b687441bda9ede0
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/LocationManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 0f08c56..86a577c 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -982,7 +982,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
if (records != null) {
for (UpdateRecord record : records) {
- if (UserHandle.getUserId(record.mReceiver.mUid) == mCurrentUserId) {
+ if (UserHandle.getUserId(record.mReceiver.mUid) == mCurrentUserId &&
+ !mBlacklist.isBlacklisted(record.mReceiver.mPackageName)) {
LocationRequest locationRequest = record.mRequest;
providerRequest.locationRequests.add(locationRequest);
if (locationRequest.getInterval() < providerRequest.interval) {