Refer to the same constant definition as other tests instead of
hard coding locally, so that it won't be missed as changing to
Build.VERSION_CODES.SC_V2.
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I3c17c414d830af03e2719c5dab1a664c55f6df2a
Address API review feedback to change naming of
setExcludedLocalRoutesVpn and getter.
Bug: 217742354
Test: atest FrameworksNetTests
Change-Id: I57bbf55c7aba1c86ec8687d2431a50b37e63c6d0
Test that NsdManager specifies the correct network when a service is
discovered, and that services can be resolved on a specified network.
Also test that service discovery can be started on a specific network.
Bug: 190249673
Test: atest NsdManagerTest
Change-Id: Ie8b551ce9e33e3adf35f75508f91bbd0df71f837
NETWORK_TYPE_5G_NSA is moved to NetworkStatsManager
Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: I9226119ee4f67688a1b4ffdab7e5a86ec0b8e974
The purpose is provide NetworkStatsCollection.Builder as
public API for adding the stats {@link NetworkStatsHistory}
Bug: 215862801
Test: atest NetworkStatsCollectionTest
Change-Id: Id83c6fa67880ba361b8e0e15c4d86b90e44ac879
Correct the SDK for those tests are expected running in T+
device. Check @IgnoreUpTo(S) may be incorrect after receiving
patches before T release.
Refer to temporary constant definition in DevSdkIgnoreRule until
the SDK constant being pushed into AOSP and synced with branch
used for mainline.
BUg: 215294242
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: Ide6a241f7944dd1e75bc33b21aa29471a5df94c6
DevSdkIgnoreRule.IgnoreUpTo() will not work as expected without
the rule defined.
Bug: 184750836
Test: atest android.net.Ikev2VpnProfileTest#\
testBuildExcludeLocalRoutesSet works as expected with ignore
rule
Change-Id: I03a5b28963cd6feebe4358d57c070d941cd114e5
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from in WifiInfo to replace wifi SSID to
solve this issue.
2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network.
a. Replaced wording SSID with key of the wifi network
b. Add mock to handle get wifi network key from WifiInfo
c. Add null/empty set unit test to verify matchWifiNetworkKeys
Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Change-Id: Id7d66f6548dd1b4e657db8d7427213293618b406
Subscriber Id Match Rules won't be exposed as system Api.
Any caller who references NetworkTemplate#SUBSCRIBER_ID_MATCH_RULE_*
should use the one in NetworkStatsUtils instead.
And remove the need of the constants as soon as possible.
Test: atest NetworkPolicyManagerServiceTest \
FrameworksNetTests
Bug: 204830222
Change-Id: I363a4440f85f1ca818eaf1125e45b141dd6f0e55
NetworkStatsAccess is using DevicePolicyManagerInternal APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 207100745
Test: atest NetworkStatsAccessTest
Change-Id: I0430ed2c47e5a695206cb660e3971ddab6c467dd
These files are needed for the data migration util system Api
interfaces. Thus, they need to be moved into frameworks folder.
This change also set the @IgnoreUpTo annotation to S, since
these tests are testing purely platform code on S- devices which
is not really necessary for MTS. Also the tests are still covered
by the unit tests, since they are always verifying HEAD.
Test: TH
Bug: 197717846
Change-Id: I93c19b4860864c724be9f9f889ee2173f4605198
Update the tests to use the newer NsdManager based on Binder interfaces
instead of AsyncChannel.
Bug: 190249673
Test: atest NsdManagerTest NsdServiceTest
Change-Id: I0991b598331e335a0bc211f010da7f034fb2441b
TcpKeepaliveController is the only user of
KeepalivePacketDataUtil.fromStableParcelable. Because of
fromStableParcelable, networkstack-client needs to depend on
net-utils-framework-commonm, which pulls a lot of unnecessary classes.
This is particularly problematic considering that networkstack-client
may need to be redistributed as a prebuilt.
Move the method to TcpKeepaliveController, simplifying dependencies.
This also shows that fromStableParcelable could be removed altogether
(or moved to tests) if TcpKeepaliveController built a
TcpKeepalivePacketData class directly.
Test: atest ConnectivityCoverageTests
Change-Id: I554318f6bcd07c73d153598a0231e9fcaf912e90
NetworkIdentity has adapted NET_CAPABILITY_TEMPORARILY_NOT_METERED
network capability so add a test case for it.
Ignore-AOSP-First: The parent of this change contains a CL will
conflict with internal tree so ignore AOSP first.
Bug: 183776809
Test: this
Change-Id: I2ca2a8b4db664b76a5a5ee82fcff451efd87c8ff
The method buildTemplateMobileWithRatType is updated to take
metered as a parameter so the callers should be updated to
the new version.
Bug: 183776809
Test: atest FrameworksNetTest
Change-Id: I859514b93705f9ee4f9ae4b0bcddcb61005a78ff
Merged-In: I859514b93705f9ee4f9ae4b0bcddcb61005a78ff
In coverage tests this seems to randomly fail, which suggests
some delay. Have a constant for timeout and increase its value
significantly where it makes no functional difference.
Test: FrameworksNetTests
Change-Id: I035d865f01688daf3bce30c5130ce550fa84b885
The registered listeners are added into internal ArrayMap as a
reference but are not removed when the listeners are
unregistered. The actions for registration should be done in
pairs.
Test: atest FrameworksNetTests
Change-Id: Id9e674f5104d1471dd81224b6a271a8a92172e34
Add two test cases for matchesMobile and matchesMobileWildcard
Bug: 183776809
Test: FrameworksNetTests:NetworkTemplateTest
Change-Id: I14d31071655204fe6ad36c71f7f521640e01c96e
The test may be run on S builds older than itself, in which case the
resource ID may not match. Query the resource ID dynamically instead of
using the constant.
IpSecAlgorithm is not updatable in S, which is why it can use
hidden/unstable platform resources, so the test could also be skipped
altogether on S. But considering that keeping it around is not very
costly yet, this change fixes it for running on S.
Bug: 197489543
Test: atest IpSecAlgorithmTest
Change-Id: I533eede3a360a8db9089e65e017b9d7453b35539
Instead of jarjaring the whole com.android.internal.util package, apply
the jarjar rules per-class. Jarjaring the whole package causes problems
in tests, as for example ConnectivityServiceTest depends on Vpn that
uses other internal utils as hidden API, and these should not be
jarjared.
Also avoid jarjaring INetdUnsolicitedEventListener which is used by
NetdEventListenerServiceTest, and ensure KeepalivePacketDataUtilTest
expects the right package name in toString.
Generally the problems appear because ConnectivityCoverageTests also
includes tests for classes that are not part of the connectivity module,
and use hidden APIs that refer to classes that should not be jarjared.
Some of the tests could be excluded from the coverage suite instead, but
keeping them is helpful for future modularization efforts.
Test: Build service-connectivity, dexdump classes and verify jarjared
atest ConnectivityCoverageTests
Change-Id: Id6b7e6833d49fa03d9442d7c1c3e4dc16fb48dfc
- Add a new transport type for USB and a new network capability
to support automotive head unit.
- In order to pass DnsManagerTest#testTransportTypesEqual, Android.bp
needs to link to dnsresolver_aidl_interface-V8-java. That test checks
whether the TRANSPORT types defined in NetworkCapabilities are the
same as IDnsResolver.aidl.
(clean cherry-pick of change in downstream branch history, original
change ID before project move:
Iec2df09a776d779108f95098e01b7ffdf6f8867a)
Bug: 181742019
Test: atest FrameworksNetTests
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ie438ec68577ebdaaf990795fa27f1169b0105411