diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp index 2bd8f6a1ed020236680213bd45feb5aa2e594ff7..1f7aa545a392146db30f557daff3a74a65a4573d 100644 --- a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp +++ b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp @@ -1154,10 +1154,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);