am bf328b40: am 4abe2d3d: am ad84f7f4: Merge "disable geofences for secondary users" into jb-mr1-dev
* commit 'bf328b4043e2f37aba8a5e86ee10726fe65ffc8a': disable geofences for secondary users
This commit is contained in:
@@ -1351,6 +1351,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
|||||||
|
|
||||||
// geo-fence manager uses the public location API, need to clear identity
|
// geo-fence manager uses the public location API, need to clear identity
|
||||||
int uid = Binder.getCallingUid();
|
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();
|
long identity = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
mGeofenceManager.addFence(sanitizedRequest, geofence, intent, uid, packageName);
|
mGeofenceManager.addFence(sanitizedRequest, geofence, intent, uid, packageName);
|
||||||
|
|||||||
Reference in New Issue
Block a user