From a4dd33e32ad0e10e73dbb956077b49956c8cbf06 Mon Sep 17 00:00:00 2001 From: jerry Date: Thu, 20 Jan 2022 08:10:07 +0000 Subject: [PATCH] fix bugs Signed-off-by: jerry --- frameworks/kits/appkit/native/app/src/context_container.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 frameworks/kits/appkit/native/app/src/context_container.cpp diff --git a/frameworks/kits/appkit/native/app/src/context_container.cpp b/frameworks/kits/appkit/native/app/src/context_container.cpp old mode 100755 new mode 100644 index 24b4c137412..700eb866e6a --- a/frameworks/kits/appkit/native/app/src/context_container.cpp +++ b/frameworks/kits/appkit/native/app/src/context_container.cpp @@ -22,6 +22,7 @@ namespace OHOS { namespace AppExecFwk { +constexpr int DEFAULT_USERID = 100; /** * Attaches a Context object to the current ability. * Generally, this method is called after Ability is loaded to provide the application context for the current ability. @@ -636,7 +637,7 @@ std::shared_ptr ContextContainer::CreateBundleContext(std::string bundl APP_LOGI("ContextContainer::CreateBundleContext length: %{public}zu, bundleName: %{public}s", bundleName.length(), bundleName.c_str()); - bundleMgr->GetBundleInfo(bundleName, BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo); + bundleMgr->GetBundleInfo(bundleName, BundleFlag::GET_BUNDLE_DEFAULT, bundleInfo, DEFAULT_USERID); if (bundleInfo.name.empty() || bundleInfo.applicationInfo.name.empty()) { APP_LOGE("ContextContainer::CreateBundleContext GetBundleInfo is error"); -- Gitee