Loading services/java/com/android/server/LocationManagerService.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1148,6 +1148,11 @@ public class LocationManagerService extends ILocationManager.Stub { boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name); boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name); if (isEnabled && !shouldBeEnabled) { if (isEnabled && !shouldBeEnabled) { updateProviderListenersLocked(name, false, mCurrentUserId); updateProviderListenersLocked(name, false, mCurrentUserId); // If any provider has been disabled, clear all last locations for all providers. // This is to be on the safe side in case a provider has location derived from // this disabled provider. mLastLocation.clear(); mLastLocationCoarseInterval.clear(); changesMade = true; changesMade = true; } else if (!isEnabled && shouldBeEnabled) { } else if (!isEnabled && shouldBeEnabled) { updateProviderListenersLocked(name, true, mCurrentUserId); updateProviderListenersLocked(name, true, mCurrentUserId); Loading Loading
services/java/com/android/server/LocationManagerService.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1148,6 +1148,11 @@ public class LocationManagerService extends ILocationManager.Stub { boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name); boolean shouldBeEnabled = isAllowedByCurrentUserSettingsLocked(name); if (isEnabled && !shouldBeEnabled) { if (isEnabled && !shouldBeEnabled) { updateProviderListenersLocked(name, false, mCurrentUserId); updateProviderListenersLocked(name, false, mCurrentUserId); // If any provider has been disabled, clear all last locations for all providers. // This is to be on the safe side in case a provider has location derived from // this disabled provider. mLastLocation.clear(); mLastLocationCoarseInterval.clear(); changesMade = true; changesMade = true; } else if (!isEnabled && shouldBeEnabled) { } else if (!isEnabled && shouldBeEnabled) { updateProviderListenersLocked(name, true, mCurrentUserId); updateProviderListenersLocked(name, true, mCurrentUserId); Loading