diff --git a/interfaces/common/src/common_func.cpp b/interfaces/common/src/common_func.cpp index 74f715a78e0ae31e13794b07911d3043bd74d213..8cdb66b62e73a593a77a435b680edac172cbd0ae 100644 --- a/interfaces/common/src/common_func.cpp +++ b/interfaces/common/src/common_func.cpp @@ -56,9 +56,6 @@ static sptr GetBundleMgrProxy() string CommonFunc::GetSelfBundleName() { - int uid = -1; - uid = IPCSkeleton::GetCallingUid(); - sptr bundleMgrProxy = GetBundleMgrProxy(); if (!bundleMgrProxy) { LOGE("GetSelfBundleName: bundle mgr proxy is nullptr."); @@ -66,9 +63,9 @@ string CommonFunc::GetSelfBundleName() } BundleInfo bundleInfo; - auto ret = bundleMgrProxy->GetBundleInfoForSelf(uid, bundleInfo); + auto ret = bundleMgrProxy->GetBundleInfoForSelf(0, bundleInfo); if (ret != ERR_OK) { - LOGE("GetSelfBundleName: bundleName get fail. uid is %{public}d", uid); + LOGE("GetSelfBundleName: bundleName get fail."); return ""; }