From 75973cb0dde856b8e3a94c808fdfc29d53252c3c Mon Sep 17 00:00:00 2001 From: Linus Tufvesson Date: Mon, 23 Mar 2020 11:59:43 +0000 Subject: [PATCH] Replace EnsureDirExists with a call to setupAppDir Test: Manually verified ownership of /storage/emulated/0/Android/data on cf_x86_phone-userdebug after enabling feature Bug: 151455752 Change-Id: I75a1e3b769476e56094e41d82e7f8e1a72827ded --- VolumeManager.cpp | 6 ++++-- VolumeManager.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 6a40a52..e4e5781 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -776,7 +776,8 @@ static std::string getStorageDirTarget(userid_t userId, std::string dirName, } // Fork the process and remount storage -static bool forkAndRemountStorage(int uid, int pid, const std::vector& packageNames) { +bool VolumeManager::forkAndRemountStorage(int uid, int pid, + const std::vector& packageNames) { userid_t userId = multiuser_get_user_id(uid); std::string mnt_path = StringPrintf("/proc/%d/ns/mnt", pid); android::base::unique_fd nsFd( @@ -814,7 +815,8 @@ static bool forkAndRemountStorage(int uid, int pid, const std::vector& packageNames); + static VolumeManager* Instance(); /*