Commit Graph

8 Commits

Author SHA1 Message Date
Benedict Wong
db8cf2a13d Pull VcnNetworkProvider out into a separate class
This change makes the VcnNetworkProvider a separate class, and caches
all NetworkRequest(s) to ensure that VcnTunnel(s) satisfy all requests
that they can accept.

Bug: 163431879
Test: atest FrameworksVcnTests
Change-Id: I3b7695628d0153a33f7e7f40d839df1463d58b07
2021-01-07 17:13:39 -08:00
Benedict Wong
9cb5807845 Verify carrier privileges for VCN-providing packages
This change adds and verifies packages in the VcnManagmentService,
ensuring that carrier privilege gain/loss correctly starts/tears down
VCN instances.

Bug: 163431877
Test: atest FrameworksNetTests
Change-Id: I63203188c57fdde1cfc58aaf1108aa3e70eb4a50
2021-01-07 17:13:37 -08:00
Benedict Wong
6153723db5 Add TelephonySubscriptionTracker to VcnMgmtSvc
This changes adds the TelephonySubscriptionTracker to
VcnManagementService, ensuring that VCN Instances are only ever started
once a relevant Subscription has been loaded in Telephony

Bug: 163430955
Test: New VcnManagementService tests added, passing
Change-Id: Ia9396d66b41fadc0a5ed7aa66306e6223a2d29b8
2021-01-07 17:00:15 -08:00
Benedict Wong
1fe26df538 Add basic VcnMgmtSvc --> Vcn signals (startup, teardown, NetworkReq)
This change adds the relevant calls to ensure that the VcnMgmtSvc
starts, updates and stops a Vcn instance when configs are set/removed

Additionally, this change ensures that upon new network requests, the
Vcn instance is notified.

Bug: 163432852
Test: atest FrameworksVcnTests
Change-Id: Ifec34fad8282a3d64b540d24f643f546463f4379
2021-01-07 17:00:12 -08:00
Benedict Wong
ab1b484ac7 Add persistence for VcnConfig objects by Subscription Group
This commit adds the ability for the VcnManagementService to track/store
VCN profiles by subscription groups, and saving/loading to/from disk.

Bug: 163611304
Test: New tests added, passing
Change-Id: Ifabf5e2be090d529cd29e2c68d55ece4858b2aad
2020-12-17 17:17:13 -08:00
Benedict Wong
264973663c Implement basic VcnConfig and VcnGatewayConnectionConfig
This change adds some of the basic fields in VcnConfig and
VcnGatewayConnectionConfig, plus adds a persistability layer to ensure
all VcnConfig(s) are disk-stable.

Bug: 163602123
Bug: 163594033
Test: New tests added, passing
Change-Id: I2e632532809e7768b284be376f2b0a77f634fef5
2020-12-16 17:51:58 -08:00
Benedict Wong
ad3271875a Enforce carrier privileges when setting/clearing VCN configs
This change ensures that only carrier-privileged apps can modify VCN
configs.

Since carrier privilege is checked per-subId, we iterate through all
subIds in the group, and check if any of them grant the calling app
carrier privileges.

Bug: 165670724
Test: New tests added, passing.
Change-Id: Iac032136d9c1975e6b95a2d2ad9b811ce45c9a53
2020-12-08 16:26:49 -08:00
Benedict Wong
0acd4caf23 Add NetworkProvider to VcnManagementService
This change adds a skeleton VcnNetworkProvider, and registers it with
ConnectivityService upon system startup.

Bug: 163431879
Test: FrameworksVcnTests passing
Change-Id: I7720db1cea805cbdca052a2e37cb2d754189ea05
2020-11-16 13:29:34 -08:00