diff options
author | Danny Baumann <dannybaumann@web.de> | 2013-07-04 16:09:22 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2013-07-04 16:10:42 +0200 |
commit | 0f166de3b0555041fb4a49b4e319d3ffedf892a8 (patch) | |
tree | b9c3844803a05833d1ce0da0e4eedf2c03616804 /services | |
parent | cca622eedca3a40b80695b0e6cf570d41394e69d (diff) | |
download | frameworks_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.java | 3 |
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) { |