summaryrefslogtreecommitdiff
path: root/tests/integration/util/com/android/server/NetworkAgentWrapper.java
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for VPN validation in NetworkMonitorChalard Jean2022-03-231-0/+4
| | | | | | | Test: New tests in this patch also FrameworksNetTests Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk Change-Id: I68aa5201ad94531e5a40999816844faef5531525
* Send access UIDs to netdChalard Jean2022-01-311-0/+4
| | | | | Test: FrameworkNetTests CtsNetTestCases Change-Id: I8301abaddf5850071fa23d41e8e736ab7071e299
* Add a mode for cell radios unable to time shareChalard Jean2021-09-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon changing the default SIM card, the radio will create a new connection to the new subscription. If that subscription works correctly, the stack will prefer it to the old one as the new subscription will be marked with a Primary policy flag it its score. Normally, at this point the old network lingers to give apps an opportunity to gracefully migrate their connections. But with some radios, this may have a dramatic effect on the performance of the new connection. This patch introduces a flag so that devices with such radios can be marked. In this case the stack will move to a degraded mode and eschew the grace delay for apps and give them a hard break instead, so that the new network can reach a good performance immediately. Apps with existing connections will suffer a worse experience. If there is a request that can only be served by the old connection, still keep it, as arguably the user still expects their MMS be sent on the old connection, even if the new connection doesn't work well until it's done. Test: new test in this patch, and add relevant tests in both modes also manually change the value of the flag and run FrameworksNetTests and CtsNetTestCasesLatestSdk Bug: 200226979 Change-Id: I4ace82f90e873bf06298cc689bb1d794ed5124bd
* Fix an infinite loop with network offersChalard Jean2021-08-191-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the avoidBadWifi configuration is false and not overridden, a WiFi network that was validated in the past but becomes unvalidated needs to outscore a cell network that is validated. This is happening correctly when the stack compares two networks. However, when the stack compares an existing network to an offer for a cellular network, the offer was automatically considered not to yield. This would mean the stack would be requesting cell out of the telephony factory, only for that network to lose to WiFi and be discarded immediately, then recreated again etc. When there is some other reason cell should be up (such as the "mobile always on" setting being active), this would not be visible because the cell network would have another reason not to be torn down. Have offers correctly account for the current value of the configuration and setting. This has the ranking of the offer lose against WiFi like the actual network loses, meaning the offer is not needed. This also requires updating the offers whenever the value of the setting changes. Test: new test for this, also ConnectivityServiceTest Bug: 195441367 Change-Id: I4fe5de98bc15bcf9bbbe25c6c7c8a7ba382f8db7
* Allow non-VPNs to have underlying networks.Lorenzo Colitti2021-07-021-0/+10
| | | | | | | | | | | | | Certain network types, like the VCN, have underlying networks for the purpose of data usage, but do not want to propagate the underlying network capabilities. Allow these networks to set underlying networks, but continue not to propagate the capabilities. Bug: 190620024 Test: new unit test Change-Id: I53d6080f48707ff3c37fbfbef534284ba77a7432
* [NS09] Implement the new ranking codeChalard Jean2021-06-071-10/+15
| | | | | | | | | | | | At this stage, this is turned off. Unit tests will be in a followup change. Test: In a followup Bug: 167544279 Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f Merged-In: I4448a3546fbc1a3dddf757982c031c5f39ba2889 Change-Id: I4448a3546fbc1a3dddf757982c031c5f39ba2889 (cherry-picked from ag/14010222 with fixes)
* [NS06] Implement the don't-reap mechanismChalard Jean2021-06-071-0/+6
| | | | | | | | | | | | | | | | This exposes a mechanism for network providers to tell the network stack that a given network must be kept up for some specific reason. This is meant to be easier for them than to have to file a request, in particular because there is no guaranteed way to make sure the request will be best matched by any given network. Test: new test for this Bug: 167544279 Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f Merged-In: I238a3ee5ee9262477a23b897e4141769dd1505d1 Change-Id: I238a3ee5ee9262477a23b897e4141769dd1505d1 (cherry-picked from ag/13929760)
* Move net unit tests to packages/ConnectivityRemi NGUYEN VAN2021-05-131-0/+377
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