Merge change 21510 into eclair

* changes:
  LocationManagerService: Add NullPointerException to avoid change in behavior.
This commit is contained in:
Android (Google) Code Review
2009-08-17 10:29:23 -07:00

View File

@@ -1100,6 +1100,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
} }
public boolean sendExtraCommand(String provider, String command, Bundle extras) { public boolean sendExtraCommand(String provider, String command, Bundle extras) {
if (provider == null) {
// throw NullPointerException to remain compatible with previous implementation
throw new NullPointerException();
}
// first check for permission to the provider // first check for permission to the provider
checkPermissionsSafe(provider); checkPermissionsSafe(provider);
// and check for ACCESS_LOCATION_EXTRA_COMMANDS // and check for ACCESS_LOCATION_EXTRA_COMMANDS