Merge "During encryption, don't throw exceptions for unknown vold state"
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 @@
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;