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/VolumeManager.h b/VolumeManager.h
index f526990..caa0b62 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -65,6 +65,7 @@
int mUmsSharingCount;
int mSavedDirtyRatio;
int mUmsDirtyRatio;
+ int mVolManagerDisabled;
public:
virtual ~VolumeManager();
@@ -83,6 +84,7 @@
int unshareVolume(const char *label, const char *method);
int shareEnabled(const char *path, const char *method, bool *enabled);
int formatVolume(const char *label);
+ void disableVolumeManager(void) { mVolManagerDisabled = 1; }
/* ASEC */
int createAsec(const char *id, unsigned numSectors, const char *fstype,
@@ -130,7 +132,7 @@
extern "C" {
#endif /* __cplusplus */
#define UNMOUNT_NOT_MOUNTED_ERR -2
- int vold_unmountVol(const char *label);
+ int vold_disableVol(const char *label);
int vold_getNumDirectVolumes(void);
int vold_getDirectVolumeList(struct volume_info *v);
#ifdef __cplusplus