Skip to content

Commit 4abe2d3

Browse files
Victoria LeaseAndroid Git Automerger
authored andcommitted
am ad84f7f: Merge "disable geofences for secondary users" into jb-mr1-dev
* commit 'ad84f7f46b0207a7ad316b4df37c1f02c889cca9': disable geofences for secondary users
2 parents 7b5a927 + ad84f7f commit 4abe2d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/java/com/android/server/LocationManagerService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,11 @@ public void requestGeofence(LocationRequest request, Geofence geofence, PendingI
13511351

13521352
// geo-fence manager uses the public location API, need to clear identity
13531353
int uid = Binder.getCallingUid();
1354+
if (UserHandle.getUserId(uid) != UserHandle.USER_OWNER) {
1355+
// temporary measure until geofences work for secondary users
1356+
Log.w(TAG, "proximity alerts are currently available only to the primary user");
1357+
return;
1358+
}
13541359
long identity = Binder.clearCallingIdentity();
13551360
try {
13561361
mGeofenceManager.addFence(sanitizedRequest, geofence, intent, uid, packageName);

0 commit comments

Comments
 (0)