Expose a SystemApi method to prepare a VPN without consent.
This is NOT designed to be called normally. Most apps (even
system-privileged ones) should request user consent before launching a
VPN. However, it is needed to support flows where consent can be
obtained through other means external to the VPN flow itself.
The API requires a system-privileged permission, CONTROL_VPN.
Bug: 18327583
Change-Id: I1bcdcf0fb5707faeb861ec4535e7ccffea369ae7
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 5997680..54f5ead 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2813,9 +2813,8 @@
}
/**
- * Prepare for a VPN application. This method is used by VpnDialogs
- * and not available in ConnectivityManager. Permissions are checked
- * in Vpn class.
+ * Prepare for a VPN application. This method is used by system-privileged apps.
+ * Permissions are checked in Vpn class.
* @hide
*/
@Override
@@ -2829,8 +2828,8 @@
/**
* Set whether the current VPN package has the ability to launch VPNs without
- * user intervention. This method is used by system UIs and not available
- * in ConnectivityManager. Permissions are checked in Vpn class.
+ * user intervention. This method is used by system-privileged apps.
+ * Permissions are checked in Vpn class.
* @hide
*/
@Override