Prevent sharing or formatting of a vold managed volumes during encryption.
Mounting was already not allowed, but also unshare before starting
encryption, and don't allow sharing or formatting to be initiated
during encrytion.
Change-Id: Ida188d81f025739ba4dd90492b3e66088735991e
diff --git a/cryptfs.c b/cryptfs.c
index a418225..50c3e64 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -1141,7 +1141,7 @@
}
close(fd);
- ret=vold_unmountVol(vol_list[i].label);
+ ret=vold_disableVol(vol_list[i].label);
if ((ret < 0) && (ret != UNMOUNT_NOT_MOUNTED_ERR)) {
/* -2 is returned when the device exists but is not currently mounted.
* ignore the error and continue. */