LocationManagerService: Add NullPointerException to avoid change in behavior.

After fixing a null pointer check we were no longer throwing NullPointerExceptions
which caused a CTS test to fail.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-08-17 13:16:08 -04:00
parent 6ba7ae1e4c
commit c6cc836f88

View File

@@ -1100,6 +1100,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
}
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
checkPermissionsSafe(provider);
// and check for ACCESS_LOCATION_EXTRA_COMMANDS