OSDN Git Service

OO NOT MERGE allow connected location providers location access
authorVictoria Lease <violets@google.com>
Tue, 7 May 2013 21:22:02 +0000 (14:22 -0700)
committerVictoria Lease <violets@google.com>
Tue, 7 May 2013 22:30:28 +0000 (15:30 -0700)
Cherry-pick of I0c383eb82ed041e57a7d32321df2d67b462d4e21 from master

Oops, it seems the fused location provider was being denied access
to locations when any user other than the primary device owner is
logged in. This was breaking the fused location provider entirely
for all secondary users of a given device.

Bug: 8766225
Change-Id: Ic0db5f2094828c897a405abb0dca6ac39a2ca526

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

index 2675309..142357d 100644 (file)
@@ -1798,7 +1798,7 @@ public class LocationManagerService extends ILocationManager.Stub {
             boolean receiverDead = false;
 
             int receiverUserId = UserHandle.getUserId(receiver.mUid);
-            if (receiverUserId != mCurrentUserId) {
+            if (receiverUserId != mCurrentUserId && !isUidALocationProvider(receiver.mUid)) {
                 if (D) {
                     Log.d(TAG, "skipping loc update for background user " + receiverUserId +
                             " (current user: " + mCurrentUserId + ", app: " +