update frameworks/location_common/common/source/common_utils.cpp.

Signed-off-by: smilebear <245252081@qq.com>
This commit is contained in:
smilebear 2024-11-21 03:47:03 +00:00 committed by Gitee
parent f55590cea0
commit 30d50d374e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -412,6 +412,15 @@ std::string CommonUtils::GenerateUuid()
return ss.str();
}
bool CommonUtils::CheckAppForUser(int32_t uid, std::string& bundleName)
{
int currentUserId = 0;
if (!GetCurrentUserId(currentUserId)) {
currentUserId = DEFAULT_USERID;
}
return CheckAppForUser(uid, currentUserId, bundleName);
}
bool CommonUtils::CheckAppForUser(int32_t uid, int32_t currentUserId, std::string& bundleName)
{
int userId = 0;