From a21f7a1ac6c7ee9aab2a3d4e13ab21f8bb0c5dc9 Mon Sep 17 00:00:00 2001 From: Jeff Davidson Date: Tue, 11 Nov 2014 13:52:58 -0800 Subject: [PATCH] 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 --- .../java/com/android/server/ConnectivityService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 5997680b28..54f5ead360 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -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