WifiNetworkFactory: Defer disconnecting from connected request
When a new request comes in as we're connected to a network from a
previous request, currently we immediately disconnect & stop tracking
the previous request. Defer this disconnection to after the user accepts
the new request.
CL introduces tracking of 2 simultaneous requests in WifiNetworkFactory,
one active request & one connected request.
a) All new requests start out as "active".
b) Once the user accepts the request & we successfully connect to the
network, we transition that request to "connected". All the UI interactions
are finished once we successfully connect, so that is a good transition
point at which we can start handling another request.
c) If a new request comes in when we have a connected request, we start
processing the new "active" without disturbing the "connected" request.
d) We also need to handle the release of either the "connected" or "active"
request from the app.
Also,
a) Renamed the |resetStateForStart|/|resetStateForEnd| methods to
|setup|/|teardown|.
b) Renamed few unit tests which were testing simultaneous request
scenarios appropriately.
Bug: 117978866
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: act.py -c wifi_manager.config -tb dut-name -tc WifiNetworkRequestTest
Change-Id: I12ec307f837315457e8697848ab36ae2c14228eb
2 files changed