passpoint-r2: fixes OSU network connection problem

Test Scenario:
1) Connected to any AP
2) Click OSU on UI to start Provisioning flow
Expected result:
Open up the OSU login window
Actual result:
Got disconnection for the AP immediately and connected to previous AP.

There are two root causes for this disconection.
1) remove ephemeral network in
removeAllEphemeralOrPasspointConfiguredNetworks() API on wifi stateMachine
at any disconnect event.
=> currently OSU AP is configured as ephemeral network in the connect of
OsuNetworkConnection not to save the config.
=> When previous AP is diconnected, it causes to disconnect ongoing
connection of OSU-AP.

Solution: removeAllEphemeralOrPasspointConfiguredNetworks only when wifi
become disable.

2) receive connect and disconnect event for previous AP.
OsuNetworkcallback receives the connect and disconnect event for
previous AP.
It causes Passpoint State to move to next state and failed to connect
OSU server.
Eventually it causes to disconnect OSU AP.

Solution: only receive the connect and disconnect event for OSU-AP.

Bug: 121223278
Test:./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: tested with R2 AP under the test scenario.
Change-Id: I77a9a36e14aed9f73773d7a06eb212604fde11fe
Signed-off-by: Ecco Park <eccopark@google.com>
4 files changed