Don't delete /mnt/user/<userId>/package on reset.
We need this to stay mounted at /storage.
Bug: 124466384
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I0cc835471ced2822d83d7056bec53d62ddc682f0
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 83632e4..358d2eb 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -76,6 +76,7 @@
using android::base::unique_fd;
using android::vold::BindMount;
using android::vold::CreateDir;
+using android::vold::DeleteDirContents;
using android::vold::DeleteDirContentsAndDir;
using android::vold::Symlink;
using android::vold::Unlink;
@@ -1234,7 +1235,7 @@
mVisibleVolumeIds.clear();
for (userid_t userId : mStartedUsers) {
- DeleteDirContentsAndDir(StringPrintf("/mnt/user/%d/package", userId));
+ DeleteDirContents(StringPrintf("/mnt/user/%d/package", userId));
}
mStartedUsers.clear();
return 0;