Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56e675b3 authored by Victoria Lease's avatar Victoria Lease
Browse files

disable geofences for secondary users

Geofences are broken in multiuser, and need to be fixed before
reenabling the feature for secondary users.

Change-Id: Ief3008a294deed47760ee25efcf1cdef5371b038
parent 0f4d5df5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);