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
This commit is contained in:
Jeff Davidson
2014-11-11 13:52:58 -08:00
parent 2207207a7f
commit a21f7a1ac6

View File

@@ -2813,9 +2813,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
/**
* 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 @@ public class ConnectivityService extends IConnectivityManager.Stub
/**
* 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