update services/location_locator/locator/source/locator_background_proxy.cpp.

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

View File

@ -393,12 +393,12 @@ bool LocatorBackgroundProxy::IsAppBackground(std::string bundleName)
return true;
}
bool LocatorBackgroundProxy::IsAppBackground(int uid)
bool LocatorBackgroundProxy::IsAppBackground(int uid, std::string bundleName)
{
std::unique_lock lock(backgroundAppMutex_);
auto iter = backgroundAppMap_.find(uid);
if (iter == backgroundAppMap_.end()) {
return false;
return IsAppBackground(bundleName);
}
int32_t status = iter->second;
if (status == BACKGROUNDAPP_STATUS) {