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
Adds ingress rate limiting functionality to ConnectivityService. The tc
rate limit is installed before we tell netd about the interface, and
removed after the network is removed from netd. When the setting
changes, the old rate limit needs to be removed before a new one can be
added (unfortunately, we cannot use NLM_F_REPLACE when configuring the
tc-police filter).
Currently, this functionality is always enabled, but may or may not work
based on kernel support.
Bug: 157552970
Test: atest FrameworksNetTests:ConnectivityServiceTest
Change-Id: I4e64b2c40490f061e42b40a1b1b3a6618c3d1a87
The pre-jarjar variant is necessary so that service-t can depend on
hidden symbols in framework-t that reference (for example as parameter)
classes that are jarjared.
Without this, when depending on framework-connectivity-tiramisu.impl,
service-connectivity-t would see post-jarjar symbols that do not match
the classnames it uses in its code.
Also split FrameworksNetTestsLib so that the same jarjar rules can be
applied between the tests and the module, avoiding different errors
between FrameworksNetTests and ConnectivityCoverageTests.
Ignore-AOSP-First: Avoiding conflicts; cherry-pick will follow
Bug: 204830222
Test: m
Change-Id: I3d0c081c4a7422e128beee11c0156f01b0377c96
Merged-In: I3d0c081c4a7422e128beee11c0156f01b0377c96
Address API review feedback to change naming of
setExcludedLocalRoutesVpn and getter.
Bug: 217742354
Test: atest FrameworksNetTests
Change-Id: I57bbf55c7aba1c86ec8687d2431a50b37e63c6d0
When the network is a VPN, NetworkMonitor needs to know whether
the VPN requests validation, and that information is stored in
NetworkAgentConfig. Pass it.
Test: FrameworksNetTests
Change-Id: I3616f0796b69ce054d92213aafdef43ba7041596
This adds a new API that lets VPN apps using VpnManager request
that the platform run its basic validation check on the resulting
network.
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I00092eee857d3e33529b19461cfd5dd060a0fe20
Passing one of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED is
required for all code targeting T or above. The correct value
here is RECEIVER_NOT_EXPORTED because the receiver is being
registered in the system server and the broadcast comes from
the system server itself (same UID).
This does not need to be guarded by OS version because
CarrierPrivilegeAuthenticator is only used on T+.
Test: m
Fix: 217642082
Change-Id: I09840b17bd54352896607737b56c6a692ffbd2c2
TestBpfMap needs to be jarjar'ed to work with ConnectivityCoverageTests
which combines both framework tests and tethering tests (and their
respective jarjar rules).
Test: atest ConnectivityCoverageTests:BpfCoordinatorTest
Change-Id: Ie3e7f0be9aeb848978f0df97be48100c808086bc
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
* changes:
Prevent native_init from starting TrafficController
Remove libutils dependency from libservice-connectivity
Merge libtraffic_controller_jni into libservice-connectivity
[NETD-TC#15] Make ConnectivityService and PermissionMonitor calls BpfNetMaps on T
* changes:
Expose access UIDs.
Send access UIDs to netd
Add accessUids to NetworkCapabilities.
Clean up restrictions on network agent capabilities
Sanitize NetworkCapabilities from agent on the handler thread
calls BpfNetMaps on T
Since TrafficController moves to mainline module for T, so some netd binder
interfaces revelant to BPF are going to deprecated. Provide JNI APIs to
call TrafficController inside mainline module for T.
Bug: 209935649
Test: atest CtsHostsideNetworkTests
Change-Id: Ib3b43cf2840e02806395af9f1e019ca6fccd032e
For now, all entry points reject this. Followup changes
will allow the supported use cases.
Test: new unit tests and CTS for this in this patch
Change-Id: I7262811a2e46336d3bb63c80886fc0578a36da94
NetworkManagementSocketTagger#kernelToTag is moving to
NetworkStatsFactory. Fix the import path in the test.
Test: atest FrameworksNetTest
Change-Id: I8797d9e589e68b4980ff5b38ba09d091420d30fd
Create a Java library that allows the BpfMap class and the
TcUtils class to find their JNI code when they are jarjard to the
package name we use in our unit tests.
Test: atest ConnectivityServiceTest
Change-Id: I2f17b1c366b2b8164eac34b94c9659bc7c0f68e0
Property "exclude_kotlinc_generated_files" is recently added to exclude some kotlinc generated files that are not needed if kotlin reflection is not used. Currently it defaults to false since there are test failures(b/213966211) which is in FullScoreTest#testToString and FullScoreTest#testMinMaxPolicyConstants that uses kotlin reflection and fails if exclude_kotlinc_generated_files defaults to true. By setting explicitly exclude_kotlinc_generated_files to false on tests like FullScoreTest#testToString, we will be able to finally default this property to true so the kotlinc generated files can be removed for most modules that don't need them.
Bug: 204888276
Bug: 213966211
Test: atest
FrameworksNetTests: com.android.server.connectivity.FullScoreTest
Change-Id: I4ed2d27c27841cb7127f669c8db34c90b4a41b1f
NETWORK_TYPE_5G_NSA is moved to NetworkStatsManager
Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: I9226119ee4f67688a1b4ffdab7e5a86ec0b8e974
Introduce ClatCoordinatorTest for unit tests of class ClatCoordinator.
Add the tests:
- testStartStopClatd
- testGetFwmark
- testAdjustMtu
Bug: 212345928
Test: atest FrameworksNetTests
Change-Id: I6908eac05b14077b450d51e1432d340c8a247eb1
The purpose is provide NetworkStatsCollection.Builder as
public API for adding the stats {@link NetworkStatsHistory}
Bug: 215862801
Test: atest NetworkStatsCollectionTest
Change-Id: Id83c6fa67880ba361b8e0e15c4d86b90e44ac879