WifiStateMachine: fix for exiting L2ConnectedState

After a L2ConnectedState to WpsRunningState transition, network is disconnected.
However, the disconnected message is ignored by WpsRunningState, leaving DHCP
still running. When entering L2ConnectedState again, WifiStateMachine gets stuck
on waiting for DhcpStateMachine, because DHCP is already running and the command
CMD_START_DHCP is ignored. Calling handleNetworkDisconnect() when exiting
L2ConnectedState fixes this problem, plus it handles disconnection correctly.

Bug: 10900241
Change-Id: Id29e4989b29db7e64719940cf93eba1f1a90912a
1 file changed