diff options
author | Ken Sumrall <ksumrall@android.com> | 2011-07-14 11:35:06 -0700 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2011-07-15 20:24:17 -0700 |
commit | 18db5c5690472f9da6ce2d580067307378675809 (patch) | |
tree | 01bd26a8f8b9cc08134392cbb88de788d125aa7f /services/java/com | |
parent | 28fa07e15f7a7ee83be9e5555bbfdd25711b3517 (diff) | |
download | frameworks_base-18db5c5690472f9da6ce2d580067307378675809.zip frameworks_base-18db5c5690472f9da6ce2d580067307378675809.tar.gz frameworks_base-18db5c5690472f9da6ce2d580067307378675809.tar.bz2 |
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
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/MountService.java | 6 |
1 files changed, 5 insertions, 1 deletions
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; |