Migrate resource usage to the connectivity resource package.
For framework resources that have known overlays, keep a fallback until
the overlays can be migrated.
Bug: 182125649
Test: atest FrameworksNetTests
Merged-In: I778d94a5aac0c4e20e78b1ba3a002495c17a38a0
(clean cherry-pick)
Change-Id: I778d94a5aac0c4e20e78b1ba3a002495c17a38a0
The permission is necessary for ConnectivityService to obtain its
resource package. As the integration tests run ConnectivityService
in-process, they need the permission.
Bug: 186091860
Test: atest FrameworksNetIntegrationTests
Change-Id: I60cf9b54faddf0ea4cb02146c83c9bba58370749
Use the more generic object TunnelConnectionParams in VCN.
TunnelConnectionParams may also be used in VPN in the future.
Test: atest FrameworksVcnTests
Bug: 180664474
Change-Id: Ie433f9df614e1f51cdff200d915b68b61e5ca35e
Add utility class to convert TunnelConnectionParams to and from
PersistableBundle.
Bug: 180664474
Test: atest EncryptedTunnelParamsUtilsTest
Change-Id: I93ae068eb6d1e1c4d3fcbaccbaae867db8d07a38
This change adds support for retrieval of a list of subscription groups
that have a VCN configured.
Bug: 184612525
Test: atest FrameworksVcnTests
Change-Id: I40553a7bb45d9b1f948c7d0a791f1b22a422d55c
Per API feedback, the get/set methods for retry intervals are renamed to
be plural, and have time units
Bug: 184612525
Test: atest FrameworksVcnTests
Test: atest CtsVcnTestCases
Change-Id: I51b3ffcfa44f72805f359e56b263da2558325372
This commit makes sure IKE_OPTION_FORCE_PORT_4500 is included
when converting IkeSessionParams to a PersistableBundle.
Bug: 185637142
Test: atest IkeSessionParamsUtilsTest
Change-Id: I1fcd6d26e64217091ad960a1c51659046e70a6ac
* changes:
Switch to using NetworkScore instead of legacy integer
Remove use of network scores, and provider IDs in VcnNetworkProvider
Improve dump detail
Disable INTERNET/DUN when mobile data toggled off
Remove hidden connectivity method access in FrameworksVcnTests
Connectivity CTS tests were moved from cts/tests/net to
packages/modules/Connectivity.
Bug: 185751610
Change-Id: Id4efd99c419706a52ad5d708888097bd6312d4e6
Test: treehugger is needed to test
The test simply creates an exception and verifies that it has the
required fields.
The constructor tests are only run on S+ as they are not part of the
API before that.
Change-Id: Ic30a34d3203c1b40923ba783a34f0cfed53a07ae
Test: atest FrameworksNetTests
Correctly count nri uid request counts in the per-app functionality in
connectivity currently used by set profile and set oem network
preference APIs. Previously, upon creation, nris would be created prior
to removing them. This would cause the uid request counts to
artificially increase and incorrectly throw an error if the request
count limit was hit even though in actuality an apps request count was
valid.
E.g., if there was an existing request for per-app functionality and
its owning app made a change to the per-app requests, it would double
count the existing requests. If the current count was say, one under the
limit, an error would be thrown even though it was being replaced which
should have resulted in no net change to the request count limit if
working correctly.
This patch will allow for the requests to be removed prior to creation
so that request counts are tabulated correctly.
Bug: 185849563
Bug: 183785319
Test: atest FrameworksNetTests
Change-Id: I13da0c81256cc02bea6aff2fe1ef99d6f6b0e764
This change switches the VcnNetworkAgent from using the legacy score
integer, and switches to using the new NetworkScore, using the legacy
integer as a internal representation.
Bug: 185204197
Test: FrameworksVcnTests
Merged-In: Ib0690243f176a2f074358fcc8430f1fd7c3d0d3c
Change-Id: Ib0690243f176a2f074358fcc8430f1fd7c3d0d3c
(cherry picked from commit ffc912dace)
This change updates the VcnNetworkProvider and associated
requestListeners to no longer use the network score and provider IDs, in
order to match the new NetworkProvider APIs.
Bug: 185204197
Test: atest FrameworksVcnTests
Merged-In: I0cabce702cfd8457fd1a152af07a847b87d67028
Change-Id: I0cabce702cfd8457fd1a152af07a847b87d67028
(cherry picked from commit fff0f8ba33)
This change disables INTERNET and DUN capabilities once the mobile data
toggle is turned off. Additionally, when the toggle is flipped, any
existing networks advertising either of those two capabilities will be
restarted in order to remove the capabilities.
Bug: 184864726
Test: atest FrameworksVcnTests
Merged-In: I81efeaa4b129443b08a597ff45e0037ddefeb414
Change-Id: I81efeaa4b129443b08a597ff45e0037ddefeb414
(cherry picked from commit fcacb06752)
Due to connectivity modularization work, hidden connectivity
methods and members are not accessible outside the module.
Remove the corresponding usage.
The test case in VcnNetworkProviderTest are not able to create
NetworkRequests with request id assigned. The loop to create
different request is removed. After that, the test does not
provide more test coverage than other tests. Thus, Remove the
test case directly.
Bug: 182859030
Test: atest FrameworksVcnTests
Merged-In: I488f62089d1dbe93c232f892885d944bef896df6
Change-Id: I488f62089d1dbe93c232f892885d944bef896df6
(cherry picked from commit 18f3a26efa)
The test simply creates an exception and verifies that it has the
required fields.
Test: atest FrameworksNetTests
Change-Id: I76ded2ac3f93ff3910bba3f1e4f1c17092e35372
This pacth changes VCN to call #setNetwork and #getNetwork instead
of #setConfiguredNetwork and #getConfiguredNetwork because the
later two methods will not be APIs.
This patch also changes VCN unit tests to build an IkeSessionParams
without a Context because the constructor requring a Context
is deprecated.
Bug: 180521384
Test: FrameworksVcnTests, CtsVcnTestCases
Change-Id: I971d0d1b6824890c58263a1960f3b8d0e66fe7d1
NetworkAgentConfigTest is a part of CtsNetTestCasesLatestSdk.
It will be used in mainline test with a R build. Test will
fail with method not found error. Add a version check to skip
the S added API tests.
Test: atest NetworkAgentConfigTest in R and S device
Fix: 185151127
Change-Id: Ib372e68afa99af455eb2713c8f6f1c8ef1d4cfdf
As API review feedback, rename disableProvisioningNotification()
to setEnabledProvisioningNotification and disableNat64Detection()
to setEnabledNat64Detection. Also, update code in caller side
accordingly.
Bug: 184735772
Test: make update-api ; atest FrameworksNetTests
Change-Id: If7305634863d1503c967e5593ebd0c8af2174bea
AuthenticationFailedException and TemporaryFailureException
will not be System APIs. This patch changes VCN to use
IkeProtocolException#getErrorType to identify a specific
protocol error.
Test: atest FrameworksVcnTests
Bug: 175091931
Change-Id: Iaf3c1c9bd34957b0efdbfd7595c2838b56449308
Adding historical logging for the setOemNetworkPreference() calls. This
will last across reboots.
Bug: 177257940
Bug: 176494815
Test: atest FrameworksNetTests
Change-Id: I4fc35fd58ff741830aa292adc1c559b4279ad8f9
This commit addresses the API review feedback that getUid()
will be better to make it be a method on UserHandle itself
rather than a static method.
Update as it is and update the corresponding usages.
Fix: 184735865
Test: make update-api
Test: atest FrameworksNetTests
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I33844309224d84764704255d251fadc8940202ca
* changes:
Dynamically set MTU based on proposed algorithms
Create proxy NetworkAgent for testing
Ensure teardown() only triggered on the right NetworkAgent.
Add dump to VcnManagementService
This change adds the relevant utilities and plumbing to ensure that MTUs
are set dynamically based on the underlying network's MTU.
Bug: 184697651
Test: atest FrameworksVcnTests
Change-Id: I77e34a92eb4e81e83d20fe6019b38ea5f1af4765