OSDN Git Service

It helps to catch the right exception.
authorJeff Sharkey <jsharkey@android.com>
Tue, 26 Mar 2013 17:29:01 +0000 (10:29 -0700)
committerJean-Baptiste Queru <jbq@google.com>
Tue, 26 Mar 2013 17:36:01 +0000 (10:36 -0700)
Bug: 7238149
Change-Id: I7b60ec44d1d1d5ece8a871cb089f811b611f4a4a

services/java/com/android/server/MountService.java

index 2e0c977..ce83a45 100644 (file)
@@ -1577,7 +1577,7 @@ class MountService extends IMountService.Stub
             boolean mounted = false;
             try {
                 mounted = Environment.MEDIA_MOUNTED.equals(getVolumeState(primary.getPath()));
-            } catch (IllegalStateException e) {
+            } catch (IllegalArgumentException e) {
             }
 
             if (!mounted) {