From 18db5c5690472f9da6ce2d580067307378675809 Mon Sep 17 00:00:00 2001 From: Ken Sumrall Date: Thu, 14 Jul 2011 11:35:06 -0700 Subject: During encryption, don't throw exceptions for unknown vold state This is a temporary fix until we get something better. During the encryption process, vold does not respond to commands because it is blocked doing the encryption. Because it doesn't respond, this code times out, sets the state to null, and thows an exception. For now, just don't throw an exception if the device is encrypting. Change-Id: I7e821ec2addd60475fb10834df533beccb2650fe --- services/java/com/android/server/MountService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'services/java/com') diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 94465fd..7f61c635 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -1339,7 +1339,11 @@ class MountService extends IMountService.Stub implements INativeDaemonConnectorC String state = mVolumeStates.get(mountPoint); if (state == null) { Slog.w(TAG, "getVolumeState(" + mountPoint + "): Unknown volume"); - throw new IllegalArgumentException(); + if (SystemProperties.get("vold.encrypt_progress").length() != 0) { + state = Environment.MEDIA_REMOVED; + } else { + throw new IllegalArgumentException(); + } } return state; -- cgit v1.1