testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent()
starts up a helper activity that listens to network connection/disconnection
notification. In many cases the test fails because the activity is just
able to start up and initialize itself before the first toggle event
arrives and in many cases it just misses by a matter of 100ms.
Added a short sleep after we start the activity and before we start
toggling WiFi to let the activity a chance to receive the first
notification.
Bug: 70988664
Change-Id: Ie122770fc8447a936d079fae7bdce61b10cf6dc2
Notification listeners are not allowed on low ram devices.
Skip testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
on low ram devices since these tests depend on being able to
register notification listeners.
Bug: 70242457
Bug: 70545780
Test: testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
Change-Id: I8ce6f330760042ca790cd6fb10e62ebe86498a06
Before calling the testAddPasspointConfigWithCertCredential
we need to check number of network already present in device
Bug: 67630919
Test: android.server.cts.CtsNetTestCases, WifiManagerTest
Change-Id: If643ab7bde760a65e9a5b1e9d47af53378a178fd
This creates a new timeout constant for scan duration, so
this test doesn't share timeout constant with other events.
This also increases the scan timeout time to 9 seconds per
our estimation.
Bug: 67462981
Test: cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiScanTimestamp
Change-Id: I7e1dea64bc8df3e4b31adbf8b5f05c8564a739b1
Currently, it's possible for isNetworkSupported() to return false
for TYPE_ETHERNET even if the device could otherwise support
Ethernet (e.g., via a USB host adapter). This can lead to APIs
APIs such as getActiveNetworkInfo and CONNECTIVITY_ACTION
behaving as if Ethernet was not present, even if it's connected.
Reduce the chance of this sort of misconfiguration by ensuring
that if the Ethernet service is running, isNetworkSupported
will return true for TYPE_ETHERNET. OEMs that would like the
function to return false should avoid starting the Ethernet
service.
(cherry picked from commit c4f38c2e5b)
Bug: 37359230
Test: ConnectivityManagerTest passes on aosp_bullhead
Change-Id: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
Merged-In: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
'set metered-network' adb command is not blocking, it doesn't
wait for the network to be marked as metered. Updated test
to sleep and poll for metered status.
Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ide3e1633167979bdca912c1c299ad17d988b537e
When the test fails, dump network_management and netpolicy
services to help in debugging.
Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I76287de2c7cd6f394af9768a69e2c0fabba3be25
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.
BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
(cherry picked from commit 9703adffd5e3bf85e482cdac45a1147caff4ac3d)
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.
BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
As part of the test, wifi ssid needs to be extracted which
is guarded by ACCESS_COARSE_LOCATION permission.
Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests -t \
com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I5c23b11dc1bf26a672bc1454ff1e2594935d43d8
Disabling Wi-Fi API which is available to CTS only disables the
infrastructure mode (association to an AP). This disables the Wi-Fi
chip (HAL/driver/firmware) only if location scanning is disabled,
otherwise the chip is still enabled.
The failing CTS Wi-Fi Aware test relied on disabling the Wi-Fi chip.
This cannot be done from CTS. Added a check for location scan setting
and skip the test if enabled.
Cannot fail and require the tester to disable location scans since other
CTS tests require it to be enabled.
Bug: 64125460
Test: run cts with and without location scans
Change-Id: I0582926dbf854c14b57dcdeb383db9b5f2a353a2
This test verifies the socket address information is not leaked by
xt_qtaguid module inside the kernel. The sock_addr parsed from
proc/net/xt_qtaguid/ctrl file should always be 0
Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases
Change-Id: Ie9ed8aa604be7c6ae364baa69922b89c006dea72
Since more test is added to the qtaguid native test file, the previous
name is not suitable for representing the purpose of this test file.
Rename it to NativeQtaguidTest.cpp.
Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases
Change-Id: Id64591db060c7d0178602517fd703dab586bfb5f