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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user