[system/vold] App2Sd support .
This commit is contained in:
8
system/vold/DirectVolume.cpp
Executable file → Normal file
8
system/vold/DirectVolume.cpp
Executable file → Normal 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
2
system/vold/ResponseCode.h
Executable file → Normal 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
|
||||
|
||||
Reference in New Issue
Block a user