mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-23 07:00:07 +00:00
update
Signed-off-by: yangpengfei <yangpengfei34@huawei.com>
This commit is contained in:
parent
fd33b09dbf
commit
13b919cb9b
@ -1207,7 +1207,7 @@ void StaStateMachine::DealConnectToUserSelectedNetwork(InternalMessagePtr msg)
|
||||
}
|
||||
SetConnectMethod(connTriggerMode);
|
||||
WifiConfigCenter::GetInstance().EnableNetwork(networkId, connTriggerMode == NETWORK_SELECTED_BY_USER, m_instId);
|
||||
WifiSettings::GetInstance().SetDeviceState(networkId, (int)WifiDeviceConfigStatus::ENABLED, false);
|
||||
BlockConnectService::GetInstance().EnableNetworkSelectStatus(networkId);
|
||||
}
|
||||
|
||||
void StaStateMachine::DealConnectTimeOutCmd(InternalMessagePtr msg)
|
||||
@ -3644,8 +3644,7 @@ void StaStateMachine::LinkedState::GoInState()
|
||||
#endif
|
||||
}
|
||||
WifiSettings::GetInstance().SetDeviceAfterConnect(pStaStateMachine->linkedInfo.networkId);
|
||||
WifiSettings::GetInstance().SetDeviceState(pStaStateMachine->linkedInfo.networkId,
|
||||
static_cast<int32_t>(WifiDeviceConfigStatus::ENABLED), false);
|
||||
BlockConnectService::GetInstance().EnableNetworkSelectStatus(pStaStateMachine->linkedInfo.networkId);
|
||||
WifiSettings::GetInstance().SyncDeviceConfig();
|
||||
pStaStateMachine->SaveDiscReason(DisconnectedReason::DISC_REASON_DEFAULT);
|
||||
pStaStateMachine->SaveLinkstate(ConnState::CONNECTED, DetailedState::CONNECTED);
|
||||
|
@ -380,7 +380,6 @@ public:
|
||||
void DealConnectionEventSuccess()
|
||||
{
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceAfterConnect(_)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SyncDeviceConfig()).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SetUserLastSelectedNetworkId(_, _)).Times(testing::AtLeast(0));
|
||||
|
@ -368,7 +368,6 @@ public:
|
||||
void DealConnectToUserSelectedNetworkSuccess()
|
||||
{
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), EnableNetwork(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceAfterConnect(_)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), GetScanInfoList(_)).Times(AtLeast(0));
|
||||
@ -394,7 +393,6 @@ public:
|
||||
pStaStateMachine->linkedInfo.connState = ConnState::CONNECTING;
|
||||
pStaStateMachine->linkedInfo.detailedState = DetailedState::OBTAINING_IPADDR;
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), EnableNetwork(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(testing::AtLeast(0));
|
||||
pStaStateMachine->DealConnectToUserSelectedNetwork(msg);
|
||||
pStaStateMachine->DealConnectToUserSelectedNetwork(nullptr);
|
||||
@ -422,7 +420,6 @@ public:
|
||||
pStaStateMachine->linkedInfo.connState = ConnState::CONNECTING;
|
||||
pStaStateMachine->linkedInfo.detailedState = DetailedState::NOTWORKING;
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), EnableNetwork(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(testing::AtLeast(0));
|
||||
pStaStateMachine->DealConnectToUserSelectedNetwork(msg);
|
||||
}
|
||||
@ -980,7 +977,6 @@ public:
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), AddDeviceConfig(_)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SyncDeviceConfig()).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiManager::GetInstance(), DealStaConnChanged(_, _, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(AtLeast(0));
|
||||
InternalMessagePtr msg = std::make_shared<InternalMessage>();
|
||||
msg->SetMessageName(WIFI_SVR_CMD_STA_NETWORK_CONNECTION_EVENT);
|
||||
EXPECT_TRUE(pStaStateMachine->pWpsState->ExecuteStateMsg(msg));
|
||||
@ -1562,7 +1558,6 @@ public:
|
||||
void DealConnectionEventSuccess()
|
||||
{
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceAfterConnect(_)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SyncDeviceConfig()).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SetUserLastSelectedNetworkId(_, _)).Times(testing::AtLeast(0));
|
||||
@ -1574,7 +1569,6 @@ public:
|
||||
void DealConnectionEventFail()
|
||||
{
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceAfterConnect(_)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SetDeviceState(_, _, _)).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiSettings::GetInstance(), SyncDeviceConfig()).Times(testing::AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SaveLinkedInfo(_, _)).Times(AtLeast(0));
|
||||
EXPECT_CALL(WifiConfigCenter::GetInstance(), SetUserLastSelectedNetworkId(_, _)).Times(testing::AtLeast(0));
|
||||
|
Loading…
Reference in New Issue
Block a user