Signed-off-by: yangpengfei <yangpengfei34@huawei.com>
This commit is contained in:
yangpengfei 2024-11-20 03:18:02 +00:00 committed by Gitee
parent 13b919cb9b
commit 1e587054cb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 11 deletions

View File

@ -84,16 +84,17 @@ void NetworkSelectionManager::GetAllDeviceConfigs(std::vector<NetworkSelection::
wifiDeviceConfigs.insert({networkCandidate.wifiDeviceConfig.networkId, networkCandidates.size() - 1});
continue;
}
}
// add suggesion network
WifiSettings::GetInstance().GetCandidateConfigWithoutUid(scanInfo.ssid, deviceKeyMgmt,
networkCandidate.wifiDeviceConfig);
if (networkCandidates.back().wifiDeviceConfig.networkId != INVALID_NETWORK_ID &&
networkCandidates.back().wifiDeviceConfig.uid != WIFI_INVALID_UID &&
networkCandidates.back().wifiDeviceConfig.isShared == IS_SUGGESTION_NETWORK) {
networkCandidates.back().wifiDeviceConfig.isShared == false) {
wifiCandidateConfigs.insert({networkCandidate.wifiDeviceConfig.networkId, networkCandidates.size() - 1});
}
}
std::stringstream wifiDevicesInfo;
for (auto &pair: wifiDeviceConfigs) {
if (wifiDevicesInfo.rdbuf() ->in_avail() != 0) {

View File

@ -37,10 +37,9 @@ public:
class BlockConnectService : public MockBlockConnectService {
public:
BlockConnectService() = default;
~BlockConnectService() = default;
~BlockConnectService() override;
static BlockConnectService &GetInstance(void);
MOCK_METHOD1(ShouldAutoConnect, bool(const WifiDeviceConfig &config));
MOCK_METHOD0(UpdateAllNetworkSelectStatus, bool());
MOCK_METHOD3(UpdateNetworkSelectStatus, bool(int targetNetworkId, DisabledReason disableReason, int wpaReason));