Commit Graph

164 Commits

Author SHA1 Message Date
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
c0e2e1c9bd Merge changes Ifabf5e2b,I2e632532
* changes:
  Add persistence for VcnConfig objects by Subscription Group
  Implement basic VcnConfig and VcnGatewayConnectionConfig
2020-12-21 07:10:36 +00:00
Benedict Wong
5267396f34 Merge "Add a TelephonySubscriptionTracker to track subId/subGrp changes" 2020-12-19 06:05:41 +00: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
2e21b0e94b Add a TelephonySubscriptionTracker to track subId/subGrp changes
This change adds a TelephonySubscriptionTracker that builds a cache of
subscription and carrier config events.

Bug: 163431879
Test: atest FrameworksVcnTests
Change-Id: Ibec2f3ce5071429929fae83ce144105623f1e164
2020-12-17 17:05:41 -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
Yan Yan
cfb6847e33 Support converting integer to/from PersistableBundle
This CL is for facilitating converting Map and List that
contains integer type objects.

Bug: 163604823
Test: PersistableBundleUtilsTest(new tests added)
Change-Id: I24239caf70035e19c3fb5eb4a85b6a0c6ccadb5a
2020-11-13 22:52:29 +00:00
Yan Yan
42444745fc Support converting byte array to/from PersistableBundle
Test: FrameworksVcnTests:PersistableBundleUtilsTest(new tests added)
Change-Id: I1d700c9b6d10a40ef43abcab449d4b07d897f0ec
2020-11-13 22:52:19 +00:00
Yan Yan
296c895e10 Add utils for converting Maps and ParcelUuid to/from PersistableBundle
This commit expands the PersistableBundleUtils by adding maps.
LinkedHashMap is used in an attempt to preserve ordering where stability
is important.

Similarly, this commit adds the ability to persist ParcelUuid(s) via
conversion to Strings.

This commit also adds a helper method to safely read and write to and
from disk

Bug: 163611304
Test: New tests added, passing
Change-Id: Ife24e94006445007be68ab0e03f27b2fd5643aa2
2020-11-13 14:49:29 -08:00
Yan Yan
b92cbc787e Add utilities to persist lists of Persistable objects
This change adds a utility class to enable persistance of Lists of
objects.

The PersistableBundle class does not currently support lists or arrays
of PersistableBundles, presumably due to the potential for key
conflicts. The utility classes added here avoid that concern by
nesting all lists as separate persistable bundles.

Bug: 163594033
Test: New PersistableBundleUtilsTest added, passing
Change-Id: I89478cf0d05d41a4b0d769de4859421061a1f1d9
2020-11-13 13:48:30 -08:00