diff --git a/bundle_tool/test/mock/mock_bundle_installer_host.cpp b/bundle_tool/test/mock/mock_bundle_installer_host.cpp index be7ad3c5..0b8f9f1b 100644 --- a/bundle_tool/test/mock/mock_bundle_installer_host.cpp +++ b/bundle_tool/test/mock/mock_bundle_installer_host.cpp @@ -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 &bundleFilePaths, + const InstallParam &installParam, const sptr &statusReceiver) +{ + APP_LOGD("enter"); + statusReceiver->OnFinished(OHOS::ERR_OK, MSG_SUCCESS); + return OHOS::ERR_OK; +} } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/bundle_tool/test/mock/mock_bundle_installer_host.h b/bundle_tool/test/mock/mock_bundle_installer_host.h index 662cc296..28fd48b2 100644 --- a/bundle_tool/test/mock/mock_bundle_installer_host.h +++ b/bundle_tool/test/mock/mock_bundle_installer_host.h @@ -49,6 +49,9 @@ public: bool Recover(const std::string &bundleName, const InstallParam &installParam, const sptr &statusReceiver); + + ErrCode StreamInstall(const std::vector &bundleFilePaths, const InstallParam &installParam, + const sptr &statusReceiver); }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/bundle_installer_host.cpp b/services/bundlemgr/src/bundle_installer_host.cpp index 3ba5849d..c40666ac 100644 --- a/services/bundlemgr/src/bundle_installer_host.cpp +++ b/services/bundlemgr/src/bundle_installer_host.cpp @@ -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 &statusReceiver) { - APP_LOGE("statusReceiver invalid"); if (!CheckBundleInstallerManager(statusReceiver)) { + APP_LOGE("statusReceiver invalid"); return false; } diff --git a/services/bundlemgr/src/sandbox_app/bundle_sandbox_installer.cpp b/services/bundlemgr/src/sandbox_app/bundle_sandbox_installer.cpp index 645ceb59..7361ad23 100644 --- a/services/bundlemgr/src/sandbox_app/bundle_sandbox_installer.cpp +++ b/services/bundlemgr/src/sandbox_app/bundle_sandbox_installer.cpp @@ -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);