OSDN Git Service

Port location blacklist code to MR1.
authorNick Pelly <npelly@google.com>
Fri, 17 Aug 2012 21:43:49 +0000 (14:43 -0700)
committerNick Pelly <npelly@google.com>
Fri, 17 Aug 2012 22:25:16 +0000 (15:25 -0700)
commit4035f5a7c191a68bc9a5912ce44c43c82e9e5dbf
treedf96aa5f4a8a2d60d872a17024d89944ece40d60
parent81c304b99d920e8d66ac16332489d78ff7162e12
Port location blacklist code to MR1.

I had to re-do this change for MR1 because LocationManagerService changed
so much. Here is the original change description:

Add package-name-prefix blacklist for location updates.

The Settings.Secure value locationPackagePrefixBlacklist and
locationPackagePrefixWhitelist contains comma seperated package-name
prefixes.

Location & geo-fence updates are silently dropped if the receiving
package name has a prefix on the blacklist. Status updates are
not affected. All other API's work as before.

A content observer is used so run-time updates to the blacklist
apply immediately. There is both a blacklist and a whitelist.
The blacklist applies first, and then exemptions are allowed
from the whitelist. In other words, if your package name prefix
matches both the black AND white list, then it is allowed.

Bug: 6986553
Change-Id: I1e151e08bd7143e47db005bc3fe9795076398df7
location/java/android/location/ILocationManager.aidl
location/java/android/location/LocationManager.java
services/java/com/android/server/LocationManagerService.java
services/java/com/android/server/location/GeofenceManager.java
services/java/com/android/server/location/LocationBlacklist.java [new file with mode: 0644]