diff options
| author | Benedict Wong <benedictwong@google.com> | 2022-03-29 01:01:03 +0000 |
|---|---|---|
| committer | Benedict Wong <benedictwong@google.com> | 2022-04-13 22:10:21 +0000 |
| commit | 1a8f3e0a14ecb88f8aebdea10fc3fa94b1ee9b69 (patch) | |
| tree | 508cc1c0095f4d9b217980463049e774f5c4b0fe /core/java/android | |
| parent | 7c379041421357a67e4277972e9b853f270717b0 (diff) | |
Allow provisioning package to retrieve subGrp, clear it's own config
This changes the VCN to allow a VCN provisioning package to retrieve
its listing of configured subgroups and clear its own configurations,
regardless of whether it is the active subscription group.
Safety is guaranteed based on the VCN's clearing of packages when app
data is cleared, and when the app is uninstalled. In addition to the
configurations not being retrievable, the clearing of the configs will
ensure that sideloading of an app with the same package name provides
no ability to otherwise impact settings.
Bug: 227248744
Test: atest FrameworksVcnTests
Change-Id: I2c774c00373942f895169a761d4e9a1d5b0b2edb
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/net/vcn/VcnManager.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/java/android/net/vcn/VcnManager.java b/core/java/android/net/vcn/VcnManager.java index 390c3b9453c2..f1b110ab29c8 100644 --- a/core/java/android/net/vcn/VcnManager.java +++ b/core/java/android/net/vcn/VcnManager.java @@ -172,11 +172,11 @@ public class VcnManager { * * <p>An app that has carrier privileges for any of the subscriptions in the given group may * clear a VCN configuration. This API is ONLY permitted for callers running as the primary - * user. Any active VCN will be torn down. + * user. Any active VCN associated with this configuration will be torn down. * * @param subscriptionGroup the subscription group that the configuration should be applied to - * @throws SecurityException if the caller does not have carrier privileges, or is not running - * as the primary user + * @throws SecurityException if the caller does not have carrier privileges, is not the owner of + * the associated configuration, or is not running as the primary user * @throws IOException if the configuration failed to be cleared from disk. This may occur due * to temporary disk errors, or more permanent conditions such as a full disk. */ @@ -196,8 +196,13 @@ public class VcnManager { /** * Retrieves the list of Subscription Groups for which a VCN Configuration has been set. * - * <p>The returned list will include only subscription groups for which the carrier app is - * privileged, and which have an associated {@link VcnConfig}. + * <p>The returned list will include only subscription groups for which an associated {@link + * VcnConfig} exists, and the app is either: + * + * <ul> + * <li>Carrier privileged for that subscription group, or + * <li>Is the provisioning package of the config + * </ul> * * @throws SecurityException if the caller is not running as the primary user */ |
