From c6cc836f88349e871c2aa7579223c9220e95e5b0 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 17 Aug 2009 13:16:08 -0400 Subject: [PATCH] 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 --- services/java/com/android/server/LocationManagerService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index f8d0e42f62e1e..2201b55beaa2e 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -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