From 84ae976a8a574e297bd9f9fdc51695963611a329 Mon Sep 17 00:00:00 2001 From: wanghang Date: Wed, 26 Oct 2022 16:15:37 +0800 Subject: [PATCH] IssueNo:#I5XU3J Description:errCode opt Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: wanghang Change-Id: Ib8f5c3793d2d751a91ba3ff5fdce36e606f25af2 --- services/bundlemgr/src/bundle_data_mgr.cpp | 4 ++-- services/bundlemgr/src/bundle_mgr_host_impl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/bundlemgr/src/bundle_data_mgr.cpp b/services/bundlemgr/src/bundle_data_mgr.cpp index 62e5ce3301..5edacc2644 100644 --- a/services/bundlemgr/src/bundle_data_mgr.cpp +++ b/services/bundlemgr/src/bundle_data_mgr.cpp @@ -2189,7 +2189,7 @@ ErrCode BundleDataMgr::SetApplicationEnabled(const std::string &bundleName, bool int32_t requestUserId = GetUserId(userId); if (requestUserId == Constants::INVALID_USERID) { APP_LOGE("Request userId is invalid"); - return ERR_BUNDLE_MANAGER_INVALID_USER_ID; + return ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST; } auto infoItem = bundleInfos_.find(bundleName); if (infoItem == bundleInfos_.end()) { @@ -2306,7 +2306,7 @@ ErrCode BundleDataMgr::SetAbilityEnabled(const AbilityInfo &abilityInfo, bool is int32_t requestUserId = GetUserId(userId); if (requestUserId == Constants::INVALID_USERID) { APP_LOGE("Request userId is invalid"); - return ERR_BUNDLE_MANAGER_INVALID_USER_ID; + return ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST; } auto infoItem = bundleInfos_.find(abilityInfo.bundleName); if (infoItem == bundleInfos_.end()) { diff --git a/services/bundlemgr/src/bundle_mgr_host_impl.cpp b/services/bundlemgr/src/bundle_mgr_host_impl.cpp index a96c461bf3..315b430d71 100644 --- a/services/bundlemgr/src/bundle_mgr_host_impl.cpp +++ b/services/bundlemgr/src/bundle_mgr_host_impl.cpp @@ -1263,7 +1263,7 @@ ErrCode BundleMgrHostImpl::SetApplicationEnabled(const std::string &bundleName, InnerBundleUserInfo innerBundleUserInfo; if (!GetBundleUserInfo(bundleName, userId, innerBundleUserInfo)) { APP_LOGE("Get calling userInfo in bundle(%{public}s) failed", bundleName.c_str()); - return ERR_BUNDLE_MANAGER_INVALID_USER_ID; + return ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST; } NotifyBundleEvents installRes = { @@ -1324,7 +1324,7 @@ ErrCode BundleMgrHostImpl::SetAbilityEnabled(const AbilityInfo &abilityInfo, boo InnerBundleUserInfo innerBundleUserInfo; if (!GetBundleUserInfo(abilityInfo.bundleName, userId, innerBundleUserInfo)) { APP_LOGE("Get calling userInfo in bundle(%{public}s) failed", abilityInfo.bundleName.c_str()); - return ERR_BUNDLE_MANAGER_INVALID_USER_ID; + return ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST; } NotifyBundleEvents installRes = { -- Gitee