mirror of
https://gitee.com/openharmony/base_location
synced 2024-11-27 09:00:27 +00:00
bugfix:cancel idle
Signed-off-by: 李文龙 <liwenlong22@huawei.com>
This commit is contained in:
parent
412924c4f0
commit
503d738e36
@ -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__);
|
||||
|
@ -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__);
|
||||
|
@ -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__);
|
||||
|
@ -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__);
|
||||
|
@ -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__);
|
||||
|
Loading…
Reference in New Issue
Block a user