Commit Graph

197 Commits

Author SHA1 Message Date
Benedict Wong
e0ee346120 Merge "Make VcnTransportInfo unparcel to null if no data contained" into sc-dev 2021-05-14 23:00:21 +00:00
Benedict Wong
d9695aced3 Make VcnTransportInfo unparcel to null if no data contained
When VcnTransportInfo is redacted, it contains no useful information. In
order to preserve the abstraction, the VcnTransportInfo should be
unparcelled to null


Bug: 8675309
Test: atest VcnTransportInfoTest
Change-Id: Ia9dbb9f259027acc74004eb1207e0a13cea56088
2021-05-14 22:53:51 +00:00
Benedict Wong
d9c05c23e6 Merge "Custom network selection" am: bc3638ce5d am: b3f0495383 am: 2a86eae65e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706226

Change-Id: Icdf319d564e4eab468d9d4e722716a2ef7d2c3cd
2021-05-14 05:25:38 +00:00
Benedict Wong
9028cac4fe Custom network selection
This change adds a basic prioritization framework in the VCN, and signal
strength thresholds for WiFi.

Bug: 188104094
Test: atest FrameworksVcnTests
Change-Id: Iee4e3dbecf1102ddc127a8c8daf08a00b6fccbbd
2021-05-13 18:57:05 -07:00
Lorenzo Colitti
34748be150 Make VcnTransportInfoTest pass on AOSP.
AOSP contains the core networking redaction changes, but not the
wifi redaction changes, so the tests that depend on wifi S
behaviour will not pass on AOSP.

Fix testApplicableRedactions by checking that the applicable
redactions are the same ones as returned by the underlying
WifiInfo object.

Fix testMakeCopyRedactForAccessFineLocation by testing the wifi
redaction code iff Build.VERSION.SDK_INT is S or later. This is
different from SdkLevel.isAtLeastS, because the latter returns
true in AOSP.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: Ia5bc896c92be19f570638f8051492e0f2d7342f9
2021-05-13 20:24:20 +09:00
Lorenzo Colitti
1ad18702f1 Immediately redact VcnTransportInfo.
Redaction of NetworkCapabilities is changing from redacting at
parcel time to redacting immediately when makeCopy() is called.
Update VcnTransportInfo redaction accordingly.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: I0c9406f426b66fd36b47d11799955def531c16ba
2021-05-13 20:24:20 +09:00
Cody Kesting
be6088d11c Merge changes I4b135749,If4fcaa52 am: 576dad4673 am: cd4e6ae6d6 am: 5cdc27d2ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704175

Change-Id: I7d636497dbc26008e659495e4236f161c90599ab
2021-05-12 23:40:05 +00:00
Cody Kesting
576dad4673 Merge changes I4b135749,If4fcaa52
* changes:
  Restructure Test Network requests for VCN connections.
  Correct variable name in VcnManagementService.
2021-05-12 22:55:17 +00:00
Lorenzo Colitti
79d74a6448 Merge changes from topic "transportinfo-explicit-redaction" into sc-dev
* changes:
  Immediately redact VcnTransportInfo.
  Do not automatically redact TransportInfo objects.
2021-05-12 22:46:36 +00:00
Treehugger Robot
1761a873cb Merge changes Icb59b15d,I6fc6a266,I5cc340e5,I94db52a8 am: b79dcb24d0 am: 5804521e8c am: 32c2d34383
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700309

Change-Id: Ifab0469fb2687cae7b361b5009abe152a35048c5
2021-05-12 17:16:19 +00:00
Treehugger Robot
b79dcb24d0 Merge changes Icb59b15d,I6fc6a266,I5cc340e5,I94db52a8
* changes:
  Request Test Networks for VCNs when in Test Mode.
  Specify if a VCN is in 'test-mode' in VcnContext.
  Create test-mode for VcnConfig.
  Require MOBIKE for IkeSessionParams in VCN configs.
2021-05-12 16:21:25 +00:00
Cody Kesting
da188b3719 Restructure Test Network requests for VCN connections.
This CL restructures the NetworkRequests used for TestNetworks
in UnderlyingNetworkTracker to clearly show that they only require
TRANSPORT_TEST and the relevant subIds.

Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: I4b135749fdde9f91c66b87b1ded921700e6440fd
2021-05-11 19:27:36 -07:00
Cody Kesting
88c5fe5e60 Request Test Networks for VCNs when in Test Mode.
This CL updates UnderlyingNetworkTracker to request Test
Networks for route selection  when the VCN it is tracking
for is in test-mode.

Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: Icb59b15df61ec43fe76e250977a985caa6a1dffc
2021-05-11 18:32:32 -07:00
Cody Kesting
5f65a440e2 Specify if a VCN is in 'test-mode' in VcnContext.
This CL updates VcnContext to include whether the VCN instance
it is created for is in test-mode (as specified by the VcnConfig).
This also changes the lifetime of VcnContext to be created uniquely
for each VCN instance (as opposed to a single VcnContext created in
VcnManagementService and used for all VCNs).

Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: I6fc6a266bf67ab2aa64202153c3c109ee98a16ca
2021-05-11 18:32:32 -07:00
Cody Kesting
fd57083e39 Create test-mode for VcnConfig.
This CL creates a test-mode for VcnConfig so that they will only
match with Test Networks. This is necessary for CTS testing so
that VCNs can run on test networks and IKE negotiations can be
injected over the Test Networks.

Bug: 182291467
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: I5cc340e5aaa34c5de8efafa52de49185a18d4bd3
2021-05-11 18:32:32 -07:00
Cody Kesting
92959d6774 Require MOBIKE for IkeSessionParams in VCN configs.
This CL updates VcnGatewayConnectionConfigs to require
IkeTunnelConnectionParams with MOBIKE enabled for the
IkeSessionParams. This is necessary for VCNs - without it,
they do not support IPsec mobility (one of the main features
of the VCN).

Bug: 187851560
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: I94db52a8c42d9fa4681fefb8f787f006933caa18
2021-05-11 16:40:56 -07:00
Lorenzo Colitti
327cff1969 Immediately redact VcnTransportInfo.
Redaction of NetworkCapabilities is changing from redacting at
parcel time to redacting immediately when makeCopy() is called.
Update VcnTransportInfo redaction accordingly.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: I0c9406f426b66fd36b47d11799955def531c16ba
2021-05-11 22:47:34 +09:00
Benedict Wong
275bf90709 Merge changes from topic "vcn-fwd" am: d7d2d2a15b am: f980436b32 am: 600401154a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682047

Change-Id: I745687f69366657dc33bfdacd878e06affd6a8ec
2021-05-11 06:10:32 +00:00
Benedict Wong
0c1a3b9db2 Apply transform to FWD policy if configured to provide tethering
This change allows the VCN to trigger the application of IpSecTransforms
as in the FWD path, ensuring that tethering works across interfaces

Bug: 185495453
Test: atest FrameworksVcnTests
Test: manual testing with cross-device tethering
Change-Id: I90fc77226ca971dbd8ac549b96a4828da1079cd5
2021-05-07 15:09:42 -07:00
Cody Kesting
dc3608af59 Merge changes I01ffdde2,Iecab1226 am: a5786a15e1 am: cbf91b3e8c am: 88d6f01bae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1696089

Change-Id: I7888e363733ac767c43a5b6c716b45da81544830
2021-05-05 22:31:12 +00:00
Cody Kesting
a5786a15e1 Merge changes I01ffdde2,Iecab1226
* changes:
  Set NOT_VCN_MANAGED capability for Networks in VcnMgmtSvc.
  Notify policy listeners when VCN subIds change.
2021-05-05 21:27:09 +00:00
Cody Kesting
2225648d47 Notify policy listeners when VCN subIds change.
This CL updates VcnManagementService to notify policy listeners
when the subIds for any VCN instances change. This is necessary to
ensure that NetworkFactories properly update their Networks in the
event that a Network comes up under an existing VCN are properly
marked as VCN-managed.

Bug: 187112989
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: Iecab1226119c8fd876131c381647267f18339db2
2021-05-04 15:57:32 -07:00
Treehugger Robot
36c49f6d34 Merge "Trigger reevaluation of all requests when mobile data state changes" am: 5a2abf1341 am: aa5e3e2164 am: 0ad647a679
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1692660

Change-Id: I9677e4ba520f55df0149359f4f02c33747dc0462
2021-05-01 02:27:01 +00:00
Benedict Wong
9d8fd5d82a Trigger reevaluation of all requests when mobile data state changes
This change ensures mobile data state changes result in the reevaluation
of all NetworkRequests; ensuring that any requests that can be fulfilled
as a result of the mobile data state change start the relevant
GatewayConnections

Test: atest FrameworksVcnTests
Change-Id: I442ca2ee0fc8b9ad962a2491ddc3818535d9e042
2021-04-30 23:29:20 +00:00
Benedict Wong
795d43d31d Merge "Update set|getRetryIntervalsMs to Millis" am: c6fe30068d am: 058149884f am: 33d2807b02
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1688783

Change-Id: Ica36f177bcb4a1d6625a0bf14288f6acd3ea4224
2021-04-29 05:44:56 +00:00
Benedict Wong
c6fe30068d Merge "Update set|getRetryIntervalsMs to Millis" 2021-04-29 04:35:45 +00:00
Benedict Wong
a344e94eda Merge "Set safe mode alarm when validation reports NOT_VALID" am: 19be41cb30 am: 5bf42637a8 am: d5af4baf80
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689285

Change-Id: Id5c0d8688d3c9be59b66d253161b8e8c941556eb
2021-04-28 02:51:12 +00:00
Benedict Wong
3de56b2ee0 Merge "Allow VcnTransportInfo to be parcelled" am: eecd1d9ca5 am: 3e633b7822 am: 13ffa97a76
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686985

Change-Id: If4f26b60f10be868ae0763a4fcccb61695d39151
2021-04-28 02:50:12 +00:00
Benedict Wong
19be41cb30 Merge "Set safe mode alarm when validation reports NOT_VALID" 2021-04-28 01:47:08 +00:00
Benedict Wong
913ae2b89b Allow VcnTransportInfo to be parcelled
Allows VCN transport info to be parcelled for purposes of sysUI

Bug: 186025257
Test: atest FrameworksVcnTests
Change-Id: I5a5d9b88659c8dcaa9ded16d491b2bac0529169a
2021-04-27 17:35:44 -07:00
Benedict Wong
e7f06d9eb9 Update set|getRetryIntervalsMs to Millis
Bug: 184612525
Test: atest FrameworksVcnTests
Change-Id: I696854960ca9488ae2c8a0c569c57a8563998ac8
2021-04-27 22:28:43 +00:00
Benedict Wong
44629199de Set safe mode alarm when validation reports NOT_VALID
Bug: 186257328
Test: atest FrameworksVcnTests
Change-Id: I80f37d42e4d61026b3521a4133257cd472c22f1a
2021-04-27 22:20:15 +00:00
Yan Yan
e1d6b0872f Merge "Remove TunnelConnectionParams interface" am: b8f67d1bd7 am: b1578de55a am: 92154c7465
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684427

Change-Id: I546b7eecca41d2a745b65f67961a2634be29609f
2021-04-27 19:51:26 +00:00
Yan Yan
de7222cba5 Remove TunnelConnectionParams interface
To avoid exposing empty interface.

Test: atest FrameworksVcnTests
Bug: 180664474
Change-Id: Ia33e75b77f1563a1c3d31e0145b7ec2be728b6db
2021-04-26 10:47:05 -07:00
Yan Yan
fcadf51f2c Merge changes from topics "encrypted-tunnel-interface", "iketunnelparams", "vcn-encrypted-tunnel" am: bc545c8a8a am: 7a52d5a3eb am: 1df96ea6ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652997

Change-Id: If056d1a90cc4dce3882168ca23302fcd086b40ae
2021-04-22 10:08:28 +00:00
Yan Yan
55b1e5fbf5 Convert TunnelConnectionParams to/from PersistableBundle am: c0b7c4fa5a am: e80e82bb67 am: 7a961913b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653048

Change-Id: Idbd09b9f8a7143e586b23db47bcffcd0b82ea0c0
2021-04-22 10:08:15 +00:00
Yan Yan
e80e82bb67 Convert TunnelConnectionParams to/from PersistableBundle am: c0b7c4fa5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653048

Change-Id: I71e0b9735af25bb3d2f8de17df1dac3df0e10106
2021-04-22 09:16:46 +00:00
Yan Yan
bc545c8a8a Merge changes from topics "encrypted-tunnel-interface", "iketunnelparams", "vcn-encrypted-tunnel"
* changes:
  Replace VcnControlPlaneConfig with TunnelConnectionParams
  Convert TunnelConnectionParams to/from PersistableBundle
  Create TunnelConnectionParams interface
2021-04-22 08:39:20 +00:00
Yan Yan
4eaa894d84 Replace VcnControlPlaneConfig with TunnelConnectionParams
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
2021-04-21 22:52:22 -07:00
Yan Yan
c0b7c4fa5a Convert TunnelConnectionParams to/from PersistableBundle
Add utility class to convert TunnelConnectionParams to and from
PersistableBundle.

Bug: 180664474
Test: atest EncryptedTunnelParamsUtilsTest
Change-Id: I93ae068eb6d1e1c4d3fcbaccbaae867db8d07a38
2021-04-21 22:49:47 -07:00
Treehugger Robot
a2da3ebb16 Merge "[VCN19] Rename get/setSubIds to get/setSubscriptionIds" 2021-04-22 04:43:26 +00:00
Benedict Wong
fbc23c6adb Merge changes I64b56575,I40553a7b am: 80afe1eeee am: f595e45401 am: 0b3c038764
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682062

Change-Id: I50cb828d54b8f7669c33945c7cef8a366c7c316c
2021-04-22 02:50:04 +00:00
Benedict Wong
80afe1eeee Merge changes I64b56575,I40553a7b
* changes:
  Expose API for retrieval of subscription groups with VCN configured
  Add support for retrieval of configured VCNs by carrier privilege
2021-04-22 01:31:11 +00:00
Benedict Wong
6e8c1d6da7 Add support for retrieval of configured VCNs by carrier privilege
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
2021-04-21 13:49:14 -07:00
Yan Yan
f3af46a6ec Merge "Include PORT_4500 option when encoding IkeSessionParams" am: c65ed07b59 am: 33f08103fa am: 04992800bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682405

Change-Id: Id235ce1f89dc48a3cf3ad26ea0217573cc1aa708
2021-04-21 19:29:43 +00:00
Yan Yan
c65ed07b59 Merge "Include PORT_4500 option when encoding IkeSessionParams" 2021-04-21 18:08:33 +00:00
Benedict Wong
cc47505d00 Merge "Rename get/setRetryInterval to get/setRetryIntervalsMs" am: 9ef01fca2a am: a746f701e2 am: 425952791a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682061

Change-Id: If957c0783fd0e7f4a6340eed8cd6e19b466048a3
2021-04-21 17:56:41 +00:00
Benedict Wong
85d294282c Rename get/setRetryInterval to get/setRetryIntervalsMs
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
2021-04-21 00:44:37 +00:00
Yan Yan
c130a2a8b1 Include PORT_4500 option when encoding IkeSessionParams
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
2021-04-20 16:41:00 -07:00
Benedict Wong
78f9acd7e7 Switch to using NetworkScore instead of legacy integer
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)
2021-04-19 13:13:05 -07:00