Don't remove OBBs when clearing app data.
This was a regression in Q - OBBs should only be removed when
uninstalling the app, not when clearing app data.
Bug: 138290079
Test: install OBB game, clear data, verify OBB still present
Change-Id: Ib9e802b976acb8ad2b9e95b7b685848180743203
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 737c6c9..adc2404 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -626,10 +626,8 @@
if (delete_dir_contents(path, true) != 0) {
res = error("Failed to delete contents of " + path);
}
- path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname);
- if (delete_dir_contents(path, true) != 0) {
- res = error("Failed to delete contents of " + path);
- }
+ // Note that we explicitly don't delete OBBs - those are only removed on
+ // app uninstall.
}
}
}