summaryrefslogtreecommitdiffstats
path: root/core/java/android/net
diff options
context:
space:
mode:
authorJeff Davidson <jpd@google.com>2014-09-11 14:13:22 -0700
committerJeff Davidson <jpd@google.com>2014-09-11 14:44:31 -0700
commit6d6ea3b6be7c41e18a8f95499e2e31133465ae47 (patch)
tree048a01ca721840cf145f9de90a48ec6726363693 /core/java/android/net
parent2f439763bd4ce8b38ab66ed45e3d8ed4a31e9a33 (diff)
downloadframeworks_base-6d6ea3b6be7c41e18a8f95499e2e31133465ae47.zip
frameworks_base-6d6ea3b6be7c41e18a8f95499e2e31133465ae47.tar.gz
frameworks_base-6d6ea3b6be7c41e18a8f95499e2e31133465ae47.tar.bz2
Update VpnService Javadoc to reflect new UX.
The major change is that consent is now "sticky" and lasts until the user explicitly disables the VPN connection. Bug: 17474362 Change-Id: Id4e7807e635bbfc7645741135209d46763e280f9
Diffstat (limited to 'core/java/android/net')
-rw-r--r--core/java/android/net/VpnService.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 050be40..c42791c 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -62,7 +62,8 @@ import java.util.List;
* conflict with each other. The system takes several actions to address
* these issues. Here are some key points:
* <ul>
- * <li>User action is required to create a VPN connection.</li>
+ * <li>User action is required the first time an application creates a VPN
+ * connection.</li>
* <li>There can be only one VPN connection running at the same time. The
* existing interface is deactivated when a new one is created.</li>
* <li>A system-managed notification is shown during the lifetime of a
@@ -82,8 +83,8 @@ import java.util.List;
* other methods in this class, and the right can be revoked at any time.
* Here are the general steps to create a VPN connection:
* <ol>
- * <li>When the user press the button to connect, call {@link #prepare}
- * and launch the returned intent.</li>
+ * <li>When the user presses the button to connect, call {@link #prepare}
+ * and launch the returned intent, if non-null.</li>
* <li>When the application becomes prepared, start the service.</li>
* <li>Create a tunnel to the remote server and negotiate the network
* parameters for the VPN connection.</li>
@@ -130,7 +131,8 @@ public class VpnService extends Service {
/**
* Prepare to establish a VPN connection. This method returns {@code null}
- * if the VPN application is already prepared. Otherwise, it returns an
+ * if the VPN application is already prepared or if the user has previously
+ * consented to the VPN application. Otherwise, it returns an
* {@link Intent} to a system activity. The application should launch the
* activity using {@link Activity#startActivityForResult} to get itself
* prepared. The activity may pop up a dialog to require user action, and
@@ -144,6 +146,10 @@ public class VpnService extends Service {
* it becomes prepared again, subsequent calls to other methods in this
* class will fail.
*
+ * <p>The user may disable the VPN at any time while it is activated, in
+ * which case this method will return an intent the next time it is
+ * executed to obtain the user's consent again.
+ *
* @see #onRevoke
*/
public static Intent prepare(Context context) {