summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Soonil Nagarkar <sooniln@google.com> 2019-03-04 16:22:39 -0800
committer Soonil Nagarkar <sooniln@google.com> 2019-03-04 16:22:39 -0800
commit497c1cb3a4edb39c6f417b8c78724690750b49b9 (patch)
treeff8b11eb58f25f9e3e8114714a259e2896838a5e
parent0718be8cfa86546f2e3b0b3fd90ee092e16775ae (diff)
Fix isProviderEnabled() on work profiles
isProviderEnabled() only allows for providers to be enabled for the foreground user. It should take into account possible work profile users as well. isLocationEnabled() needs to changes as settings are shared across profiles. Bug: 123511998 Test: manual Change-Id: I86716106b226bb64ca8a613b2ed97666087b6fab
-rw-r--r--services/core/java/com/android/server/LocationManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index 18e990676fbc..bbd51ad2743e 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -1176,7 +1176,7 @@ public class LocationManagerService extends ILocationManager.Stub {
@GuardedBy("mLock")
public boolean isUseableForUserLocked(int userId) {
- return userId == mCurrentUserId && mUseable;
+ return isCurrentProfileLocked(userId) && mUseable;
}
@GuardedBy("mLock")