Loading services/core/java/com/android/server/LocationManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -2570,7 +2570,7 @@ public class LocationManagerService extends ILocationManager.Stub { // Check INTERACT_ACROSS_USERS permission if userId is not current user id. checkInteractAcrossUsersPermission(userId); // enable all location providers // Enable or disable all location providers synchronized (mLock) { for(String provider : getAllProviders()) { setProviderEnabledForUser(provider, enabled, userId); Loading @@ -2586,10 +2586,10 @@ public class LocationManagerService extends ILocationManager.Stub { */ @Override public boolean isLocationEnabledForUser(int userId) { // Check INTERACT_ACROSS_USERS permission if userId is not current user id. checkInteractAcrossUsersPermission(userId); // If at least one location provider is enabled, return true synchronized (mLock) { for (String provider : getAllProviders()) { if (isProviderEnabledForUser(provider, userId)) { Loading @@ -2602,7 +2602,7 @@ public class LocationManagerService extends ILocationManager.Stub { @Override public boolean isProviderEnabled(String provider) { return isProviderEnabledForUser(provider, UserHandle.myUserId()); return isProviderEnabledForUser(provider, UserHandle.getCallingUserId()); } /** Loading Loading
services/core/java/com/android/server/LocationManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -2570,7 +2570,7 @@ public class LocationManagerService extends ILocationManager.Stub { // Check INTERACT_ACROSS_USERS permission if userId is not current user id. checkInteractAcrossUsersPermission(userId); // enable all location providers // Enable or disable all location providers synchronized (mLock) { for(String provider : getAllProviders()) { setProviderEnabledForUser(provider, enabled, userId); Loading @@ -2586,10 +2586,10 @@ public class LocationManagerService extends ILocationManager.Stub { */ @Override public boolean isLocationEnabledForUser(int userId) { // Check INTERACT_ACROSS_USERS permission if userId is not current user id. checkInteractAcrossUsersPermission(userId); // If at least one location provider is enabled, return true synchronized (mLock) { for (String provider : getAllProviders()) { if (isProviderEnabledForUser(provider, userId)) { Loading @@ -2602,7 +2602,7 @@ public class LocationManagerService extends ILocationManager.Stub { @Override public boolean isProviderEnabled(String provider) { return isProviderEnabledForUser(provider, UserHandle.myUserId()); return isProviderEnabledForUser(provider, UserHandle.getCallingUserId()); } /** Loading