diff --git a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp index 5171ae06906421d0765bb0f3cbc2fc256a466a7d..9b2537be728706a8b087591ae23bb59190517a91 100644 --- a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp +++ b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp @@ -1229,6 +1229,10 @@ static sptr GetBundleMgrsa() return iface_cast(bundleMgrSa); } +std::map> DEC_PATH_MAP = { + {"ohos.permission.SANDBOX_ACCESS_MANAGER", {"/storage/Users/currentUser/appdata"}} +}; + int32_t PolicyInfoManager::CleanPolicyByPackageChanged(const std::string &bundleName, int32_t userID) { auto bundleMgr = GetBundleMgrsa(); @@ -1246,7 +1250,7 @@ int32_t PolicyInfoManager::CleanPolicyByPackageChanged(const std::string &bundle SANDBOXMANAGER_LOG_INFO(LABEL, "get appindex size = %{public}zu", appIndexes.size()); appIndexes.emplace_back(0); - std::map> decPathMap = GetDecPathMap(); + std::map> decPathMap = DEC_PATH_MAP; for (int32_t appIndex : appIndexes) { uint32_t tokenId = Security::AccessToken::AccessTokenKit::GetHapTokenID(userID, bundleName, appIndex); if (tokenId == Security::AccessToken::INVALID_TOKENID) {