mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-27 01:01:03 +00:00
update
Signed-off-by: yangpengfei <yangpengfei34@huawei.com>
This commit is contained in:
parent
39c18a795d
commit
b8f5063dd4
@ -87,7 +87,8 @@ SavedWifiFilter::~SavedWifiFilter()
|
||||
|
||||
bool SavedWifiFilter::Filter(NetworkCandidate &networkCandidate)
|
||||
{
|
||||
return networkCandidate.wifiDeviceConfig.networkId != INVALID_NETWORK_ID;
|
||||
return networkCandidate.wifiDeviceConfig.networkId != INVALID_NETWORK_ID &&
|
||||
(networkCandidate.wifiDeviceConfig.uid == -1 || networkCandidate.wifiDeviceConfig.isShared == true);
|
||||
}
|
||||
|
||||
|
||||
@ -569,4 +570,21 @@ bool WifiSwitchThresholdFilter::Filter(NetworkCandidate &networkCandidate)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SuggestionNetworkWifiFilter::SuggestionNetworkWifiFilter() : SimpleWifiFilter("suggestionNetworkWifiFilter") {}
|
||||
|
||||
SuggestionNetworkWifiFilter::~SuggestionNetworkWifiFilter()
|
||||
{
|
||||
if (!filteredNetworkCandidates.empty()) {
|
||||
WIFI_LOGI("filteredNetworkCandidates in %{public}s: %{public}s",
|
||||
filterName.c_str(),
|
||||
NetworkSelectionUtils::GetNetworkCandidatesInfo(filteredNetworkCandidates).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool SuggestionNetworkWifiFilter::Filter(NetworkCandidate &networkCandidate)
|
||||
{
|
||||
return networkCandidate.wifiDeviceConfig.uid != WIFI_INVALID_UID &&
|
||||
networkCandidate.wifiDeviceConfig.isShared == false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user