The tests are also useful in CTS to ensure that the
ConnectivityDiagnosticsManager class API is implemented properly
(including behavior of the DataStallReport class for example).
Bug: 187935317
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: I86f39238054f43403f9a1e383dd2a935de84f06f
This does not change the mockito library to use mockito-extended in
FrameworksNetTests, but changes the tests so that they would pass if
built against that library.
This is useful to run FrameworksNetTests in a common test suite with
other tests that use mockito-extended, for example a common connectivity
coverage test target.
The change includes increasing the test timeout in
ConnectivityServiceTest, as mockito-extended can have performance impact
(~3 times on hwasan builds). This change does not make tests run slower
in the current FrameworksNetTests suite though.
Bug: 187935317
Test: atest FrameworksNetTests
Change-Id: I61fa371e8957037075a2617a014647ff062207c6
Starting with API level 31, the subscriberId is applicable
for the wifi network. Considering applications may use
null or an empty string as subscriberId (for instance, cts),
frameworks create MATCH_WIFI_WILDCARD NetworkTemplate when querying
wifi network with null or an empty string which is the behavior before
API level 31.
Bug: 188915450
Test: atest -c NetworkStatsManagerTest
Change-Id: Id4ae06840e1749997e970b8f1ec391060967bd47
The test causes a Log.wtf to be logged, because it tests a method that
should not be used after R. Mock the terrible failure handler to avoid
crashes on eng builds.
Test: atest KeepalivePacketDataUtilTest
Change-Id: Ic06a0db7fefb4acf38b66feba9b47e21f9927b1c
This is necessary to mock classes like BatteryStatsManager, which cannot
be used without signature permissions, and to merge the test with other
test suites that use mockito extended.
Bug: 187935317
Test: atest FrameworksNetTests
Change-Id: I5dba65d806c5d06b3ff8f633846edb911a7a44ec
This commit allows IKEv2/IPsec VPN to propose more algorithms that
newly added in IpSecAlgorithm. Those new algorithms have stronger
security guarantees and better performances.
This commit also removes algorithm name validation because all
algorithms are URL encoded to ensure no special characters create
problems due to their use by VpnProfile for list or field delimiting
(e.g. rfc7539esp(chacha20,poly1305))
Bug: 185265778
Test: atest FrameworksNetTests, CtsNetTestCases
Test: All new algorithms are manually verified
Change-Id: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
This CL modifies NetworkTemplate#buildTemplateCarrier to force on
metered carrier network and rename to buildTemplateCarrierMetered.
This method was introduced recently and has no callers.
This method will be used in Settings and NetworkPolicyManagerService
to display and manage data usage on carrier metered networks.
Settings/NetworkPolicyManagerService will use it instead of the existing
method buildTemplateMobileAll method, which only matches metered networks.
That code will change from matching metered mobile networks to matching
metered carrier networks.
Note: The carrier metered network includes metered mobile network and
metered "merged carrier wifi network" that is a specific cerrier wifi network
which provides the same user experience as mobile.
Bug: 176396812
Test: atest -c NetworkTemplateTest
Change-Id: I7196d62bb60844458a6c4b1d94e2baccb71e15cd
This CL adds APIs for telephony to perform filter matching based on
remote address if the socket is connected. Additional checks will be
performed on the state of socket to avoid the future callbacks in a
separate CL.
Bug: 181916576
Test: Manually verified in live T-Mobile network
atest ConnectivityServiceTest
atest com.android.internal.telephony.dataconnection.QosCallbackTrackerTest
Change-Id: I6fbd4e84c76bc4acbf4e59f06f8e86e0237bae29
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.
Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.
Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc