Merge "Fixed problems in audio effect volume control." into gingerbread
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 7d07e4b..9ceda7e 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -424,8 +424,7 @@
      * {@link LocationListener#onLocationChanged} method will be called for
      * each location update
      *
-     * @throws IllegalArgumentException if provider is null or doesn't exist
-     * @throws IllegalArgumentException if listener is null
+     * @throws IllegalArgumentException if provider or listener is null
      * @throws RuntimeException if the calling thread has no Looper
      * @throws SecurityException if no suitable permission is present for the provider.
      */
@@ -977,7 +976,7 @@
      * @return true if the provider is enabled
      *
      * @throws SecurityException if no suitable permission is present for the provider.
-     * @throws IllegalArgumentException if provider is null or doesn't exist
+     * @throws IllegalArgumentException if provider is null
      */
     public boolean isProviderEnabled(String provider) {
         if (provider == null) {
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 8519e2c..3bcf427 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1613,8 +1613,6 @@
             }
         } catch (SecurityException se) {
             throw se;
-        } catch (IllegalArgumentException iae) {
-            throw iae;
         } catch (Exception e) {
             Slog.e(TAG, "isProviderEnabled got exception:", e);
             return false;
@@ -1638,7 +1636,7 @@
 
         LocationProviderInterface p = mProvidersByName.get(provider);
         if (p == null) {
-            throw new IllegalArgumentException("provider=" + provider);
+            return false;
         }
         return isAllowedBySettingsLocked(provider);
     }
@@ -1650,8 +1648,6 @@
             }
         } catch (SecurityException se) {
             throw se;
-        } catch (IllegalArgumentException iae) {
-            throw iae;
         } catch (Exception e) {
             Slog.e(TAG, "getLastKnownLocation got exception:", e);
             return null;
@@ -1663,7 +1659,7 @@
 
         LocationProviderInterface p = mProvidersByName.get(provider);
         if (p == null) {
-            throw new IllegalArgumentException("provider=" + provider);
+            return null;
         }
 
         if (!isAllowedBySettingsLocked(provider)) {