summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-11-07 14:03:55 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-07 14:03:55 -0800
commitbf328b4043e2f37aba8a5e86ee10726fe65ffc8a (patch)
tree7fce7fbc354949da63cba83eae5db9f3d39fd8b6
parentccbfd617e730e5c3660fb3b9edf4f272db4abfd0 (diff)
parent4abe2d3d367029080653818f538222603f13bed2 (diff)
am 4abe2d3d: am ad84f7f4: Merge "disable geofences for secondary users" into jb-mr1-dev
* commit '4abe2d3d367029080653818f538222603f13bed2': disable geofences for secondary users
-rw-r--r--services/java/com/android/server/LocationManagerService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 9416b521a542..229050500b1c 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1351,6 +1351,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
// geo-fence manager uses the public location API, need to clear identity
int uid = Binder.getCallingUid();
+ if (UserHandle.getUserId(uid) != UserHandle.USER_OWNER) {
+ // temporary measure until geofences work for secondary users
+ Log.w(TAG, "proximity alerts are currently available only to the primary user");
+ return;
+ }
long identity = Binder.clearCallingIdentity();
try {
mGeofenceManager.addFence(sanitizedRequest, geofence, intent, uid, packageName);