mirror of
https://gitee.com/openharmony/base_location
synced 2024-11-23 23:10:05 +00:00
wifi scan modify
Signed-off-by: ruan-shaofei <ruanshaofei2020@163.com>
This commit is contained in:
parent
2a8174f707
commit
3c6b871153
@ -284,7 +284,6 @@ void LocatorWifiScanEventCallback::OnWifiScanStateChanged(int state)
|
||||
LBSLOGD(LOCATOR, "OnWifiScanStateChanged state=%{public}d", state);
|
||||
if (state == 0) {
|
||||
LBSLOGE(LOCATOR, "OnWifiScanStateChanged false");
|
||||
return;
|
||||
}
|
||||
auto dataManager = LocatorRequiredDataManager::GetInstance();
|
||||
if (dataManager == nullptr) {
|
||||
@ -337,12 +336,16 @@ __attribute__((no_sanitize("cfi"))) void LocatorRequiredDataManager::StartWifiSc
|
||||
if (wifiScanPtr_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (scanListHandler_ != nullptr) {
|
||||
scanListHandler_->SendHighPriorityEvent(EVENT_GET_WIFI_LIST, 0, DEFAULT_TIMEOUT_4S);
|
||||
}
|
||||
int ret = wifiScanPtr_->Scan();
|
||||
if (ret != Wifi::WIFI_OPT_SUCCESS) {
|
||||
LBSLOGE(LOCATOR, "%{public}s WifiScan failed, ret=%{public}d", __func__, ret);
|
||||
if (scanListHandler_ != nullptr) {
|
||||
scanListHandler_->SendHighPriorityEvent(EVENT_GET_WIFI_LIST, 0, 0);
|
||||
}
|
||||
} else {
|
||||
if (scanListHandler_ != nullptr) {
|
||||
scanListHandler_->SendHighPriorityEvent(EVENT_GET_WIFI_LIST, 0, DEFAULT_TIMEOUT_4S);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
LBSLOGD(LOCATOR, "StartWifiScan timeInterval_=%{public}d", timeInterval_);
|
||||
|
Loading…
Reference in New Issue
Block a user