mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-27 01:11:15 +00:00
fix for dataPreloadApp
Signed-off-by: sunjiakun <sunjiakun5@huawei.com>
This commit is contained in:
parent
7eb42e7209
commit
cd43208f2b
@ -2003,7 +2003,7 @@ ErrCode BaseBundleInstaller::InnerProcessInstallByPreInstallInfo(
|
||||
innerInstallParam.isPreInstallApp = true;
|
||||
innerInstallParam.removable = preInstallBundleInfo.IsRemovable();
|
||||
innerInstallParam.copyHapToInstallPath = false;
|
||||
innerInstallParam.isDataPreloadHap = IsDataPreloadHap(pathVec.front());
|
||||
innerInstallParam.isDataPreloadHap = IsDataPreloadHap(pathVec.empty() ? "" : pathVec.front());
|
||||
ErrCode resultCode = ProcessBundleInstall(pathVec, innerInstallParam, preInstallBundleInfo.GetAppType(), uid);
|
||||
if (resultCode != ERR_OK && innerInstallParam.isDataPreloadHap) {
|
||||
LOG_E(BMS_TAG_INSTALLER, "set parameter BMS_DATA_PRELOAD false");
|
||||
|
@ -1086,7 +1086,7 @@ void BMSEventHandler::ProcessSystemBundleInstall(
|
||||
installParam.preinstallSourceFlag = ApplicationInfoFlag::FLAG_BOOT_INSTALLED;
|
||||
SystemBundleInstaller installer;
|
||||
ErrCode ret = installer.InstallSystemBundle(preScanInfo.bundleDir, installParam, appType);
|
||||
if (ret != ERR_OK && ret != ERR_APPEXECFWK_INSTALL_ZERO_USER_WITH_NO_SINGLETON) {
|
||||
if (ret != ERR_OK && ret != ERR_APPEXECFWK_INSTALL_ZERO_USER_WITH_NO_SINGLETON && !preScanInfo.isDataPreloadHap) {
|
||||
LOG_W(BMS_TAG_DEFAULT, "Install System app:%{public}s error", preScanInfo.bundleDir.c_str());
|
||||
SavePreInstallException(preScanInfo.bundleDir);
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ void BundleUserMgrHostImpl::OnCreateNewUser(int32_t userId, const std::vector<st
|
||||
if (!info.GetBundlePaths().empty() && (info.GetBundlePaths().front().find(DATA_PRELOAD_APP) == 0) &&
|
||||
userId != Constants::START_USERID) {
|
||||
APP_LOGW("data preload app only install in 100 ,bundleName: %{public}s", info.GetBundleName().c_str());
|
||||
totalHapNum--;
|
||||
continue;
|
||||
}
|
||||
sptr<UserReceiverImpl> userReceiverImpl(
|
||||
|
Loading…
Reference in New Issue
Block a user