diff options
author | John Wu <topjohnwu@google.com> | 2022-02-09 16:49:23 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-09 16:49:23 +0000 |
commit | d17ebebe81b2a56a03c443d5b0231e548df1c1d1 (patch) | |
tree | 1b73767fda61e0525448e4f0c05dfde83e30bd50 | |
parent | 91cf5ef2afed7f29eb06757faf28484e6c47a5e2 (diff) | |
parent | 3b38337be16d3d55fad547636257cf3074eda8b9 (diff) | |
download | native-android-s-v2-beta-3.tar.gz |
Merge "Fix data migration after appId change"android-s-v2-beta-3android-s-qpr3-beta-1android-s-v2-beta-3android-s-qpr3-beta-1
-rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 6 |
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); |