am 27ef0f73: am 9714d2c4: Merge "Don\'t throw an exception from isProviderEnabled and getLastKnownLocation" into gingerbread

Merge commit '27ef0f732c5a97ba88a699b7490045e5370cf51f'

* commit '27ef0f732c5a97ba88a699b7490045e5370cf51f':
  Don't throw an exception from isProviderEnabled and getLastKnownLocation
This commit is contained in:
Adam Bliss
2010-07-19 09:07:53 -07:00
committed by Android Git Automerger
2 changed files with 4 additions and 9 deletions

View File

@@ -1614,8 +1614,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
}
} catch (SecurityException se) {
throw se;
} catch (IllegalArgumentException iae) {
throw iae;
} catch (Exception e) {
Slog.e(TAG, "isProviderEnabled got exception:", e);
return false;
@@ -1639,7 +1637,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
LocationProviderInterface p = mProvidersByName.get(provider);
if (p == null) {
throw new IllegalArgumentException("provider=" + provider);
return false;
}
return isAllowedBySettingsLocked(provider);
}
@@ -1651,8 +1649,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
}
} catch (SecurityException se) {
throw se;
} catch (IllegalArgumentException iae) {
throw iae;
} catch (Exception e) {
Slog.e(TAG, "getLastKnownLocation got exception:", e);
return null;
@@ -1664,7 +1660,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
LocationProviderInterface p = mProvidersByName.get(provider);
if (p == null) {
throw new IllegalArgumentException("provider=" + provider);
return null;
}
if (!isAllowedBySettingsLocked(provider)) {