The test did not verify that mobile networks were validated before
starting, which could cause them to validate during the test and pick up
the test URLs. Verify that mobile data is validated before the test.
Also shorten test URL expiration, so in case of hard-interrupt of the
test (without calling tearDown) it does not affect other tests for a
long time.
Bug: 178630586
Test: atest CtsNetTestCases
Change-Id: I03f346bcc231f869f50ca9c7e84bfac319bcc871
Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."
Revert submission 1579872-vcn07
Reason for revert: Possible culprit for b/179768816, broken ConnectivityControllerTest
Reverted Changes:
Id09b19c13:Address comments on aosp/1550755
I245bd69e0:[VCN07.1] Add test for bypassing VCN for non-inter...
I9936894b9:[VCN07] Bypass VCN for non-internet app accessible...
Change-Id: I7902a221c8597427e48d3e32fa5668b9c1a47420
Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."
Revert submission 1579872-vcn07
Reason for revert: Possible culprit for b/179768816, broken ConnectivityControllerTest
Reverted Changes:
Id09b19c13:Address comments on aosp/1550755
I245bd69e0:[VCN07.1] Add test for bypassing VCN for non-inter...
I9936894b9:[VCN07] Bypass VCN for non-internet app accessible...
Change-Id: I3fded28691e05a3dbf25bb7361c72acaa61b29c7
SubscriptionManager.setSubscriptionOverrideUnmetered() has been updated
to add NET_CAPABILITY_TEMPORARILY_NOT_METERED instead of
NET_CAPABILITY_NOT_METERED. So, we can't rely on that for changing the
meteredness.
Bug: 179664982
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideNetworkCallbackTests.java
Change-Id: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
Merged-In: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
This method does not behave correctly when wifi is connected but
the last CONNECTIVITY_ACTION broadcast was not for wifi. This
could happen due to another network connecting or disconnecting,
such as VPN.
Bug: 179774433
Test: test-only change
Change-Id: Ib2010b3871133c38b6d508bf508134dd9b814ce2
On R and below, when an app that is not the active VPN app calls
getConnectionOwnerUid, a SecurityException is thrown. On S and
above, the method just returns INVALID_UID, which is what would
happen if the app was the active VPN app but was not authorized
to find that particular socket.
Accept both behaviours.
Bug: 173331190
Test: atest HostsideVpnTests#testGetConnectionOwnerUidSecurity passes on R and S
Change-Id: Ie6de2ef505b0d7bc253c55215a698aeaa210785c
SubscriptionManager.setSubscriptionOverrideUnmetered() has been updated
to add NET_CAPABILITY_TEMPORARILY_NOT_METERED instead of
NET_CAPABILITY_NOT_METERED. So, we can't rely on that for changing the
meteredness.
Bug: 179664982
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideNetworkCallbackTests.java
Ignore-AOSP-First: Handling merge-conflict
Change-Id: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
This CL bypass adding NOT_VCN_MANAGED on R device. And add TODOs
for refactoring and adding test coverage.
Test: atest CtsNetTestCasesLatestSdk:NetworkRequestTest on R device
Bug: 175662146
Change-Id: Id09b19c13f9a74e25d45689d2211418172dfaec8
This would allow us to run both metered and unmetered networkpolicy
related tests when the device is on a cellular network.
Bug: 165343126
Test: atest CtsHostsideNetworkTests:HostsideRestrictBackgroundNetworkTests
Test: atest CtsHostsideNetworkTests:HostsideNetworkCallbackTests
Change-Id: Id70856dffc920e74bda28583dba4dd851a832397
Merged-In: Id70856dffc920e74bda28583dba4dd851a832397
This would allow us to run both metered and unmetered networkpolicy
related tests when the device is on a cellular network.
Bug: 165343126
Test: atest CtsHostsideNetworkTests:HostsideRestrictBackgroundNetworkTests
Test: atest CtsHostsideNetworkTests:HostsideNetworkCallbackTests
Ignore-AOSP-First: Handling merge-conflict
Change-Id: Id70856dffc920e74bda28583dba4dd851a832397
Fixes: 178334463
Test: com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testMeteredNetworkAccess_expeditedJob
Ignore-AOSP-First: Expedited jobs are not available in AOSP yet
Change-Id: Ie68e17063454e7feeffc93b20b1b8fbb276e837f
Fixes: 178077028
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
Ignore-AOSP-First: FLAG_MUTABLE is not available in aosp
Change-Id: I91013ffe375fb7befc58134a571ea9ab37c3affa
This would make it easy to add these tests to JobScheduler
related TEST_MAPPINGs.
Test: atest src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Expedited jobs are not available in AOSP yet
Change-Id: I4132c3b694515a23ff41aa413b48d6251f5b685e
Tests fail on R because the INetworkAgentRegistry member of
FakeConnectivityService cannot be found, which crashes before the
existing ignore rule is evaluated.
Use DevSdkIgnoreRunner to ignore the class before it is initialized.
Bug: 177290955
Test: atest CtsNetTestCasesLatestSdk:NetworkAgentTest on R
Change-Id: I403ba523763f2d9993ee4068a35c6269eafb577f
Bug: 177641226
Test: atest CtsHostsideNetworkTests:HostsideRestrictBackgroundNetworkTest
Ignore-AOSP-First: Expedited jobs are not available in AOSP yet
Change-Id: Idc0762093667d49f09d52050c47c29cbc55997e1
NetworkAgent is not updatable on R-, so there is no need to run tests
compiled against S on older platforms. They are also incompatible
because NetworkAgent stopped using AsyncChannel in S.
This only affects MTS, and CTS used to test S+ devices. CTS for R-
devices is already cut in a branch that this change will not merge to.
Bug: 177290955
Change-Id: I85c137a1b5fd7ef701fba4623566df5a8fb707a3
Test: atest CtsNetTestCasesLatestSdk