By the new feature introduced in next Android release.
Any PendingIntent needs to be specified about the mutability.
While ConnectivityService would put extra info such as
network or request id before broadcasting the inner intent.
The MUTABLE flag needs to be added accordingly.
Test: this
Fix: 178121691
Change-Id: I87d0efaf51a91556ef9f8e18db38803e4861cfd7
The test failed since the API is not available on R device.
Add conditions to ignore it.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
Bug: None
Change-Id: I3cbc623a84f7313e1155fe83a44ebef042a04076
The asserted capabilities change callback event took 170ms
in average to fire on cuttlefish, which causes 35% of
flakiness since the event might delay up to 500ms in practice.
Extend to 30s timeout value which is the standard value
of waiting for network callback events in CTS.
This change also ignore the test up to Android R since the API
is not available for R devices or below.
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork \
--rerun-until-failure 500
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
on R device
Bug: 179694867
Change-Id: Ic5e11d4a4f326150848bc48038fa01cde39f7661
This is a re-upload that combines aosp/1550755 and aosp/1579872.
Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Test: atest CtsNetTestCasesLatestSdk on R device
Bug: 175662146
Change-Id: I2fdc2418339bef30c9f816d63418bba218abf4a1
We already run these tests when platform code affecting these tests
change. Now enabling these too to also run when these tests are being
changed.
Fixes: 154344933
Test: atest --test-mapping packages/modules/Connectivity/tests/cts/hostside
Change-Id: Ie3ea67670ccd028815936d30189146c25ba87e28
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