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

Skip to content
Commit 86568d70 authored by Brad Larson's avatar Brad Larson Committed by Jean-Baptiste Queru
Browse files

Use isLocationProviderEnabled to test for enabled providers



LocationManagerService was just checking if the string of (comma-separated)
Location Providers contained the provider we were interested in.  This works
fine in normal cases, but breaks if we add a provider such as test_network.
Enabling test_network causes LocationManagerService to think that the network
provider is also enabled.

The code in Settings.Secure.isLocationProviderEnabled() checks for the commas
in the string as well, to make sure that a provider name which is a substring
of another provider name won't cause problems.  It also centralizes the code
which reads the string.

Signed-off-by: default avatarBrad Larson <brad.larson@garmin.com>

Change-Id: I00dfe7c2b09739ed4c8ed07c6167e409b0bf7d13
parent af7c9782
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment