diff options
Diffstat (limited to 'src/com/android/settings/MediaFormat.java')
-rw-r--r-- | src/com/android/settings/MediaFormat.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/settings/MediaFormat.java b/src/com/android/settings/MediaFormat.java index 71d2766..075534d 100644 --- a/src/com/android/settings/MediaFormat.java +++ b/src/com/android/settings/MediaFormat.java @@ -64,15 +64,19 @@ public class MediaFormat extends Activity { if (Utils.isMonkeyRunning()) { return; } - IMountService service = + final IMountService service = IMountService.Stub.asInterface(ServiceManager.getService("mount")); if (service != null) { - try { - service.formatVolume(Environment.getExternalStorageDirectory().toString()); - } catch (android.os.RemoteException e) { - // Intentionally blank - there's nothing we can do here - Log.w("MediaFormat", "Unable to invoke IMountService.formatMedia()"); - } + new Thread() { + public void run() { + try { + service.formatVolume(Environment.getExternalStorageDirectory().toString()); + } catch (Exception e) { + // Intentionally blank - there's nothing we can do here + Log.w("MediaFormat", "Unable to invoke IMountService.formatMedia()"); + } + } + }.start(); } else { Log.w("MediaFormat", "Unable to locate IMountService"); } |