【资源缓存】OTA时只刷新主用户资源

Signed-off-by: xiaozuo00 <xuyicong3@huawei.com>
Change-Id: If6017b70f0e8275ca741e8ce98b6386c82ae0b1c
This commit is contained in:
xiaozuo00 2024-11-14 22:09:49 +08:00
parent 4c840a4cc4
commit 55fd5f857b
2 changed files with 11 additions and 1 deletions

View File

@ -753,6 +753,7 @@ private:
const InnerBundleInfo &oldBundleInfo, bool isPreInstallApp);
bool DeleteDisposedRuleWhenBundleUpdateEnd(const InnerBundleInfo &oldBundleInfo);
void ProcessAddResourceInfo(const InstallParam &installParam, const std::string &bundleName, int32_t userId);
InstallerState state_ = InstallerState::INSTALL_START;
std::shared_ptr<BundleDataMgr> dataMgr_ = nullptr; // this pointer will get when public functions called

View File

@ -1356,7 +1356,7 @@ ErrCode BaseBundleInstaller::ProcessBundleInstall(const std::vector<std::string>
RemoveOldExtensionDirs();
/* process quick fix when install new moudle */
ProcessQuickFixWhenInstallNewModule(installParam, newInfos);
BundleResourceHelper::AddResourceInfoByBundleName(bundleName_, userId_);
ProcessAddResourceInfo(installParam, bundleName_, userId_);
VerifyDomain();
MarkInstallFinish();
UtdHandler::InstallUtdAsync(bundleName_, userId_);
@ -6319,5 +6319,14 @@ bool BaseBundleInstaller::DeleteDisposedRuleWhenBundleUpdateEnd(const InnerBundl
return true;
#endif
}
void BaseBundleInstaller::ProcessAddResourceInfo(const InstallParam &installParam,
const std::string &bundleName, int32_t userId)
{
if (installParam.isOTA && userId != Constants::START_USERID) {
return;
}
BundleResourceHelper::AddResourceInfoByBundleName(bundleName_, userId_);
}
} // namespace AppExecFwk
} // namespace OHOS