4613c7e02acad7b67d749507fae8c86880b43504
While tests are hopefully cleaning up after themselves, there is no guarantee that there is a currently available default network milliseconds after any given test. Some tests need to disconnect to check something, or to change a property of the wifi network that they have to revert at the end for example. Or, a test may fail leaving the device without a default network. To make sure the state is correctly cleaned up, have tearDown make sure the device is connected to a working Internet connection before the test ends, so that the next test can be sure to find established connectivity immediately. It's possible the device needs a few hundred milliseconds to re-establish connectivity, so this patch gives a grace of up to 30 seconds (the default waiting timer for TestCallback) for connectivity to be restored at the end of any test. Bug: 161767594 and others Test: ConnectivityManagerTest Change-Id: I8cf3e6e6c116cabd5b04bf2562da84f7e635ca2a
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%