Fix LocationManager.getProvider() API breakage.

getProvider() needs to work for providers that are disabled.
It should only return null if the provider does not exist.

Change-Id: Ieb9fbd8965a10329377bc8ac9d8061cebe519ab5
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2010-03-12 07:51:06 -05:00
parent 80362d4ac8
commit 223e84d733

View File

@@ -1341,7 +1341,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
private Bundle _getProviderInfoLocked(String provider) {
LocationProviderInterface p = mProvidersByName.get(provider);
if (p == null || !p.isEnabled()) {
if (p == null) {
return null;
}