!1375 修复bm测试用例失败

Merge pull request !1375 from shilei91/weekly_20220510
This commit is contained in:
openharmony_ci
2022-05-11 10:24:17 +00:00
committed by Gitee
4 changed files with 13 additions and 1 deletions
@@ -82,5 +82,13 @@ bool MockBundleInstallerHost::Recover(const std::string &bundleName, const Insta
statusReceiver->OnFinished(OHOS::ERR_OK, MSG_SUCCESS);
return true;
}
ErrCode MockBundleInstallerHost::StreamInstall(const std::vector<std::string> &bundleFilePaths,
const InstallParam &installParam, const sptr<IStatusReceiver> &statusReceiver)
{
APP_LOGD("enter");
statusReceiver->OnFinished(OHOS::ERR_OK, MSG_SUCCESS);
return OHOS::ERR_OK;
}
} // namespace AppExecFwk
} // namespace OHOS
@@ -49,6 +49,9 @@ public:
bool Recover(const std::string &bundleName, const InstallParam &installParam,
const sptr<IStatusReceiver> &statusReceiver);
ErrCode StreamInstall(const std::vector<std::string> &bundleFilePaths, const InstallParam &installParam,
const sptr<IStatusReceiver> &statusReceiver);
};
} // namespace AppExecFwk
} // namespace OHOS
@@ -372,8 +372,8 @@ bool BundleInstallerHost::Uninstall(const std::string &bundleName, const std::st
bool BundleInstallerHost::InstallByBundleName(const std::string &bundleName,
const InstallParam &installParam, const sptr<IStatusReceiver> &statusReceiver)
{
APP_LOGE("statusReceiver invalid");
if (!CheckBundleInstallerManager(statusReceiver)) {
APP_LOGE("statusReceiver invalid");
return false;
}
@@ -113,6 +113,7 @@ ErrCode BundleSandboxInstaller::InstallSandboxApp(const std::string &bundleName,
// 6. create data dir and generate uid and gid
userInfo.bundleName = bundleName_ + Constants::FILE_UNDERLINE + std::to_string(newAppIndex);
userInfo.gids.clear();
dataMgr_->GenerateUidAndGid(userInfo);
userInfo.bundleName = bundleName_;
info.AddInnerBundleUserInfo(userInfo);