bugfix:cancel idle

Signed-off-by: 李文龙 <liwenlong22@huawei.com>
This commit is contained in:
李文龙 2024-09-18 15:48:44 +08:00
parent 412924c4f0
commit 503d738e36
5 changed files with 20 additions and 0 deletions

View File

@ -317,6 +317,10 @@ LocationErrCode GeoConvertService::SetReverseGeocodingMockInfo(
bool GeoConvertService::CancelIdleState()
{
SystemAbilityState state = GetAbilityState();
if (state != SystemAbilityState::IDLE) {
return true;
}
bool ret = CancelIdle();
if (!ret) {
LBSLOGE(GEO_CONVERT, "%{public}s cancel idle failed!", __func__);

View File

@ -197,6 +197,10 @@ LocationErrCode GnssAbility::SetEnable(bool state)
bool GnssAbility::CancelIdleState()
{
SystemAbilityState state = GetAbilityState();
if (state != SystemAbilityState::IDLE) {
return true;
}
bool ret = CancelIdle();
if (!ret) {
LBSLOGE(GNSS, "%{public}s cancel idle failed!", __func__);

View File

@ -392,6 +392,10 @@ void LocatorAbility::UpdateSaAbilityHandler()
bool LocatorAbility::CancelIdleState()
{
SystemAbilityState state = GetAbilityState();
if (state != SystemAbilityState::IDLE) {
return true;
}
bool ret = CancelIdle();
if (!ret) {
LBSLOGE(LOCATOR, "%{public}s cancel idle failed!", __func__);

View File

@ -230,6 +230,10 @@ LocationErrCode NetworkAbility::SetEnable(bool state)
bool NetworkAbility::CancelIdleState()
{
SystemAbilityState state = GetAbilityState();
if (state != SystemAbilityState::IDLE) {
return true;
}
bool ret = CancelIdle();
if (!ret) {
LBSLOGE(NETWORK, "%{public}s cancel idle failed!", __func__);

View File

@ -103,6 +103,10 @@ LocationErrCode PassiveAbility::SetEnable(bool state)
bool PassiveAbility::CancelIdleState()
{
SystemAbilityState state = GetAbilityState();
if (state != SystemAbilityState::IDLE) {
return true;
}
bool ret = CancelIdle();
if (!ret) {
LBSLOGE(PASSIVE, "%{public}s cancel idle failed!", __func__);