!791 修改检视意见

Merge pull request !791 from 李文龙/master
This commit is contained in:
openharmony_ci 2024-07-24 07:31:16 +00:00 committed by Gitee
commit 9a42df088e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -181,7 +181,8 @@ void LocatorAbility::OnRemoveSystemAbility(int32_t systemAbilityId, const std::s
if (locationPrivacyEventSubscriber_ != nullptr) {
bool ret = OHOS::EventFwk::CommonEventManager::UnSubscribeCommonEvent(locationPrivacyEventSubscriber_);
locationPrivacyEventSubscriber_ = nullptr;
LBSLOGI(LOCATOR, "UnSubscribeCommonEvent locatorEventSubscriber_ result = %{public}d", ret);
isLocationPrivacyActionRegistered_ = false;
LBSLOGI(LOCATOR, "UnSubscribeCommonEvent locationPrivacyEventSubscriber_ result = %{public}d", ret);
return;
}
@ -190,6 +191,7 @@ void LocatorAbility::OnRemoveSystemAbility(int32_t systemAbilityId, const std::s
return;
}
bool result = OHOS::EventFwk::CommonEventManager::UnSubscribeCommonEvent(locatorEventSubscriber_);
isActionRegistered = false;
LBSLOGI(LOCATOR, "UnSubscribeCommonEvent locatorEventSubscriber_ result = %{public}d", result);
}