summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wu <topjohnwu@google.com>2022-02-09 16:49:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-09 16:49:23 +0000
commitd17ebebe81b2a56a03c443d5b0231e548df1c1d1 (patch)
tree1b73767fda61e0525448e4f0c05dfde83e30bd50
parent91cf5ef2afed7f29eb06757faf28484e6c47a5e2 (diff)
parent3b38337be16d3d55fad547636257cf3074eda8b9 (diff)
downloadnative-android-s-qpr3-beta-1.tar.gz
-rw-r--r--cmds/installd/InstalldNativeService.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index c3256fcfff..544c69c2a7 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -698,9 +698,6 @@ binder::Status InstalldNativeService::createAppDataLocked(
if (!status.isOk()) {
return status;
}
- if (previousUid != uid) {
- chown_app_profile_dir(packageName, appId, userId);
- }
// Remember inode numbers of cache directories so that we can clear
// contents while CE storage is locked
@@ -726,6 +723,9 @@ binder::Status InstalldNativeService::createAppDataLocked(
if (!status.isOk()) {
return status;
}
+ if (previousUid != uid) {
+ chown_app_profile_dir(packageName, appId, userId);
+ }
if (!prepare_app_profile_dir(packageName, appId, userId)) {
return error("Failed to prepare profiles for " + packageName);