Remove packageName from vold internal state.
std::remove will only move the matching items to the end, there should be an erase call after that to actually get rid of those items from the container. Test: manual Change-Id: I7d3b48f77fa5fab703fb10cf429d8c183322ed29
This commit is contained in:
parent
2717699b49
commit
ba0c62f752
1 changed files with 2 additions and 1 deletions
|
@ -900,7 +900,8 @@ int VolumeManager::destroySandboxForApp(const std::string& packageName,
|
|||
LOG(VERBOSE) << "destroySandboxForApp: " << packageName << ", sandboxId=" << sandboxId
|
||||
<< ", userId=" << userId;
|
||||
auto& userPackages = mUserPackages[userId];
|
||||
std::remove(userPackages.begin(), userPackages.end(), packageName);
|
||||
userPackages.erase(std::remove(userPackages.begin(), userPackages.end(), packageName),
|
||||
userPackages.end());
|
||||
// If the package is not uninstalled in any other users, remove appId and sandboxId
|
||||
// corresponding to it from the internal state.
|
||||
bool installedInAnyUser = false;
|
||||
|
|
Loading…
Reference in a new issue