From ecd8eeb66127fbb0f63378e25391bf5804dcae35 Mon Sep 17 00:00:00 2001 From: liuhaotian Date: Fri, 3 Nov 2023 09:39:24 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BC=A0=E5=8F=82=EF=BC=8C=E4=BD=BF=E8=83=BD=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E8=8E=B7=E5=8F=96=E5=88=B0=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuhaotian Change-Id: Ib8ce20bfbc516e867d30c86a8dc2ba74e2b6f7be --- interfaces/common/src/common_func.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/interfaces/common/src/common_func.cpp b/interfaces/common/src/common_func.cpp index 74f715a78..8cdb66b62 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 ""; } -- Gitee