From 7f65bff6c5135653fb8cab3248d55e768602a82f Mon Sep 17 00:00:00 2001 From: xiaozuo00 Date: Thu, 28 Aug 2025 22:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B5=84=E6=BA=90=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E3=80=91=E9=80=82=E9=85=8D0=E7=94=A8=E6=88=B7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaozuo00 Change-Id: I6ab3d1e642733c8338abd9409b224a50b3f667cf --- .../src/bundle_resource/bundle_resource_manager.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp index 8b709cb609..323402c195 100644 --- a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp +++ b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp @@ -1145,10 +1145,8 @@ int32_t BundleResourceManager::GetUserId() { int32_t userId = BundleUtil::GetUserIdByCallingUid(); if (userId == Constants::DEFAULT_USERID) { - // check is sa call - if (BundlePermissionMgr::IsNativeTokenType()) { - userId = AccountHelper::GetCurrentActiveUserId(); - } + // sa call or U0 app + userId = AccountHelper::GetCurrentActiveUserId(); } if (userId < Constants::DEFAULT_USERID) { APP_LOGE("userId %{public}d is invalid", userId); -- Gitee