If a test fails without unregistering an agent, other tests will
see their requests match the old agent. That means any test failing
will fail all subsequent tests, which is not very helpful.
Solve this by making sure the agents are unregistered before the
test ends. Also ensure the requests are unregistered.
Test: NetworkAgentTest
Bug: 139268426
Change-Id: If183d78298aa2a0bcae9e2487199dee14014cdfb
Merged-In: I2c167803d478d31fd85dc6e6e621f35d36c68fb4
(cherry-picked from aosp/1284556)
When location is disabled, Wi-Fi scan results and SSID are not available
to apps.
Fixes: 153850762
Fixes: 153396893
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I05285811d7131e116d5e1d072137ed2cf9576d05
This change adds test for new public APIs.
Bug: 135998869
Test: atest CtsNetTestCasesLatestSdk:TrafficStatsTest
Change-Id: Iefc234fb85145b31a1f7842b93b4d6fc4425bab6
Merged-In: I6b4a6773e22a204b6267d28638b9f57a0d0eb65a
(cherry picked from commit e5a3234c38c35aaec55029e369f2aac2ec4326cd)
It's hard to read in current design, refactor the
assertion into assertInRange() for readability.
Bug: 153614624
Test: atest android.net.cts.TrafficStatsTest
Change-Id: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
Merged-In: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
(cherry picked from commit af3469bdc7031d80f3d3838518fd7518b3e8eb9c)
Add cts to test current public APIs and new public
APIs.
Bug: 151110319
Bug: 152617305
Test: atest CtsNetTestCasesLatestSdk:ProxyInfoTest
Change-Id: I3e7d2cb7b4c5e47fc85d418aa8ef504367b3d8db
Merged-In: I451989f7312fb98ec2fa0b7b9ddc856ecf2087be
(cherry picked from commit 0a4d5ecc83d56c2c3f400927a2b8af6e26eb8db8)
This is a basic test that only tests register(), markConnected(),
unregister and onNetworkUnwanted. It provides the backbone for
the tests, a harness to test callbacks on NetworkAgent, and
demonstrates how the instrumentation in
ConnectivityService can be used to test this API.
Test: this
Bug: 139268426
Change-Id: I859208f381ccc22a85d6bccb44c0d5d84c3380c6
Merged-In: I022c9e237fdaec27338047c171c04e5a96cf89e3
(cherry picked from commit 723b519dc2de077c37db510850a590188591a80b, aosp/1253423)
After vts-core is renamed to vts, the CTS tests won't be needed in vts
suite.
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL removes all CTS tests in vts suite,
as vts is renamed to vts10. This CL won't change test logic or behavior.
Change-Id: Idc9e9cc1d1080ff689823671a736bbb78bd7a740
The API addOrUpdatePasspointConfiguration is deprecated on R and
available only for privileged apps. Inherit Shell permissions.
Bug: 152373068
Test: atest android.net.wifi.cts.WifiManagerTest#testAddOrUpdatePasspointConfiguration
Change-Id: Iaedc1e67ecff116a540d7ac9f2f4e50696e459f8
The AudioGroup constructor with a Context parameter does not exist on Q
devices.
Use the previous constructor on older devices.
Test: atest CtsNetTestCasesLatestSdk on Q and R devices
Bug: 150918852
Merged-In: I24c3e7ab8c7219d6f345943ead3e3b6418fa7f47
Change-Id: I24c3e7ab8c7219d6f345943ead3e3b6418fa7f47
Test APIs below:
NetworkInfo(int, int, String, String)
setDetailedState(android.net.NetworkInfo.DetailedState, String, String)
Bug: 152356365
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkInfoTest
on both Q and R devices
Change-Id: Idada858b1d5cd4c0907998b289aca4d6e6d04f56
Merged-In: Idada858b1d5cd4c0907998b289aca4d6e6d04f56
(cherry picked from aosp/1267480)
ScanResult is now a final class, mock will not work. Use real one
instead.
Bug: 152434349
Test: atest WifiRttTest
Change-Id: I25daf0c2596a5a1a24726e68a79191ad4199b142