[system/vold] App2Sd support .

This commit is contained in:
Firefly
2015-05-20 16:24:53 +08:00
committed by djw
parent f8e52a9a29
commit b51b0861b4
2 changed files with 9 additions and 1 deletions

8
system/vold/DirectVolume.cpp Executable file → Normal file
View File

@ -746,6 +746,14 @@ void DirectVolume::handlePartitionRemoved(const char * /*devpath*/,
*/
bool providesAsec = (getFlags() & VOL_PROVIDES_ASEC) != 0;
if(providesAsec){
snprintf(msg, sizeof(msg), "Volume %s %s unmount (%d:%d)",
getLabel(), getMountpoint(), major, minor);
mVm->getBroadcaster()->sendBroadcast(ResponseCode::VolumeUnmount,
msg, false);
sleep(2);
}
if (providesAsec && mVm->cleanupAsec(this, true)) {
SLOGE("Failed to cleanup ASEC - unmount will probably fail!");
}

2
system/vold/ResponseCode.h Executable file → Normal file
View File

@ -68,7 +68,7 @@ public:
/* $_rbox_$_modify_$_huangyonglin: added for adding the partition command */
static const int VolumePartitionAdded = 633;
/* $_rbox_$_modify_$ end */
static const int VolumeUnmount = 634;
static int convertFromErrno();
};
#endif