The extra info is taken into NetworkMonitor from while creating
it. The NetworkMonitor is created when a new agent is registered
but the extra info is not available at that time. Make sure the
field is set in the NetworkInfo when registering.
Bug: 156173829
Test: adb shell dumpsys network and check the apn in the extra
info shown correctly
Test: atest FrameworkNetTests
Change-Id: Ieaad8cbf1a28af3b97c7f98f74358e417fcad661
MatchAllNetworkSpecifier is a subclass of NetworkSpecifer. The method
satisfiedBy should be renamed to canBeSatisfiedBy together with other
subclass of NetworkSpecifer in b/152238712.
Add annotation @Overide for the method to make sure it will not get
ignored when refactor in the future.
Bug: 154956584
Test: atest android.net.MatchAllNetworkSpecifierTest
Change-Id: Ibe32fd50fae43aa635c1c0dad66eaea82011c8b7
Address comment from aosp/1162443.
Move to FrameworksNetCommonTests so that it can be run in
cts test and presubmit test.
Also change package name from android.net.cts to android.net
Bug: 154299158
Test: atest FrameworksNetTest
atest CtsNetTestCasesLatestSdk:android.net.DhcpInfoTest
Change-Id: I42a965ae5cb748fdd80b4d5c0f8b26f36f74be72
Add network agent to test more situation that could get the
onNetworkRequested callback.
Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Id494a1697cc1b73e8e56ae585a69faec31c59f52
It will skip whole tests on Q device since NetworkProvider class
is introduced in R.
Result on Q device would be:
[1/1] android.net.NetworkProviderTest#skippedClassForDevSdkMismatch: IGNORED (3ms)
Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: If7bfc7fae503e3497c37754697d0b148ff4cab3b
Add missing tests to cover all system APIs
Bug: 152280218
Bug: 150640683
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest on
both Q and R device
Change-Id: I6d3826922f16816d5b18ed3540266442a0ed3e49
Commit has to on top of aosp/1281921 to skip whole test in Q
device since CaptivePortalData class is introduced in R.
Result in Q will be:
[1/1] android.net.CaptivePortalDataTest#skippedClassForDevSdkMismatch: IGNORED
Bug: 152280218
Bug: 150640683
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest on
both Q and R device
Change-Id: Iddd00e1c85abe767b1a41a1761d3266ba322dba6
Currently, the addEntry method is used in constructor of test,
which is not correct since there is no such method in Q devices.
Thus, initialize of NetworkStats variables outside of constructor.
Test: atest NetworkStatsApiTest
Test: atest CtsNetTestCasesLatestSdk:NetworkStatsApiTest on Q device
Bug: 150644692
Change-Id: Ibf2f8118c459a8d7a0992deca8f0f339ccd1bcea
setAdministratorUids does not exist on Q, so such tests must be skipped
on Q devices.
Bug: 147903575
Test: atest CtsNetTestCasesLatestSdk on Q and AOSP devices
Change-Id: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
VPN is considered fully routed if both IPv4 and IPv6 have
either a default route or a prohibit route.
Bug: 145332510
Test: atest FrameworksNetTests
Change-Id: I59cf48552bca98092d1212e3d718fd420add5458
Administrator UIDs stored in NetworkCapabilities should be sorted. This
allows for easier equals checks and hashCode computation. Additionally,
duplicate UIDs should be prevented.
Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: Ia5387ca2ce7c3fcbd04dc7fbff5266f7bcc71694
NetworkCapabilities#mAdministratorUids should be checked for equality
when combining NetworkCapabilities. Administrator UIDs should also be
included in NetworkCapabilities equals() and hashCode().
Bug: 147903575
Test: FrameworksNetTests
Change-Id: I803bdec80e27ee80d3a39844c5fb7aed584ab07d
The getSSID() has changed to getSsid() in Android R, adding
isAtLeastR() to prevent NetworkCapabilitiesTest fail on Android
Q.
Bug: 151322799
Test: Run "atest CtsNetTestCasesLatestSdk:NetworkCapabilitiesTest"
on Android Q & R device.
Change-Id: I602ae32dae1ad29fe3293c541fa6d2cef01b81d3
Merged-In: I602ae32dae1ad29fe3293c541fa6d2cef01b81d3
CompareResult had been moved from LinkProperties to LinkPropertiesUtils
so this change ignores testCompareResult() on Q and only check
compareAllRoutes() works while android version is at least R.
Bug: 151782584
Test: atest CtsNetTestCasesLatestSdk:LinkPropertiesTest
Change-Id: I38b0d83abf983b3bcc01fc6aea2e5cc307734198
Add tests for getApfEtherTypeBlackList and getApfDrop8023Frames APIs.
Bug: 150640397
Test: atest CtsNetTestCasesLatestSdk:android.net.apf.ApfCapabilitiesTest
on both of Q and R devices.
Change-Id: I06c5d84d7025420a1e45a953c8c7a5cc3c452e24
Add test for constructor and parcel
Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
Add test for constructor of KeepalivePacketData and
InvalidPacketException
Bug: 151109466
Test: atest CtsNetTestCasesLatestSdk:android.net.KeepalivePacketDataTest
on both Q and R devices
Change-Id: Ic9db4b9b83ff96c87f41c5f381763c3ee8dd27c8
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).
Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
LinkPropertiesTest must be backwards compatible with Q for CTS.
In Q 4 fields were added: DhcpServerAddress, WakeOnLanSupported,
CaptivePortalApiUrl, CaptivePortalData. The new test only tests these
fields on R and above.
testLinkPropertiesParcelable_Q still verifies that there are 14 fields
on Q, so the 4 extra fields can be ignored.
The changes use androidx.core.os.BuildCompat.isAtLeastR(), so
androidx.core_core is added as a dependency to FrameworksNetCommonTests.
Test: atest CtsNetTestCasesLatestSdk:android.net.LinkPropertiesTest
on Q and R devices
Bug: 150918852
Change-Id: I570efa4eb483a717d4204a18473d02653a69f46d
Bug: 149426063
Bug: 150640362
Test: atest CtsNetTestCasesLatestSdk:android.net.util.SocketUtilsTest
on both Q and R devices
Change-Id: I4b5a3dfb78b404d414b7dc358e6f16c3414a8b33