10980d136ce7184bcee0c6c755c1350292e04608
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
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%