Remove the ephemeral network when new config represents same network.

Problem:
While we are in the procedure of OSU, if we click different entry that
is actually same one with OSU under the hood to connect on Wifi Picker,
nothing will happen and it will be blocked in the stagei
 because we do not disconnect OSU AP to abort current flow.
Root cause:
The configuration for OSU and Captive portal network
represents same network, so it has same network ID.
Solution:
Remove the corresponding ephemeral network before we add/update
the network with new configuration.

Bug: 121223278
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Tested with OSU AP that supports captive portal and OSU function
at the same time.
Signed-off-by: Ecco Park <eccopark@google.com>

Change-Id: I2f715974ae11a57d75df61736a9e3973da36b706
2 files changed
tree: e8775a59f6ee89c8a32159b71ff388b340954ab7
  1. service/
  2. PREUPLOAD.cfg