diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp index 8b709cb609ee2a5fb7dba4d9fafb4a0962ca220e..323402c1950d2e48882e75434c8c7fa3e2a68321 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);