Remi NGUYEN VAN 10980d136c Auto-configure wifi on virtual devices
At the moment tests run on virtual devices through TEST_MAPPING do not
necessarily have wifi configured to auto-connect to a test SSID.

This could be fixed by adding a TargetPreparer in AndroidTest.xml with a
given SSID, but that configuration would then apply to all runs,
including local ones. There is also no good way to apply a preparer that
configures wifi "if it is not already connected": WifiPreparer in
particular will not configure wifi even if just a mobile network is
active.

Implement auto-configuration in CtsNetUtils#connectToWifi so that if no
network is configured, and a virtual SSID is detected when scanning,
that SSID will be added to the list of configured networks. This allows
addressing the issue until TEST_MAPPING can support configuring wifi,
with minimal side-effects on other runs.

Test: atest CtsNetTestCasesLatestSdk:CaptivePortalTest
Bug: 158153057
Change-Id: I47df4c325b073f8a9bf320894245eed211606952
2020-07-16 10:07:37 +09:00
Description
android_packages_modules_Connectivity
189 MiB
Languages
Java 81.4%
Kotlin 7.7%
AIDL 4.5%
C++ 4.5%
C 1.7%
Other 0.1%