summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Benjamin Miller <benjaminmiller@google.com> 2017-07-17 14:23:25 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-17 14:23:25 +0000
commit2ecc1988771caed870ba2b7bfd069e68d53f2adb (patch)
treed05a9e5fc410937bac4337195c04571c7ed9cae0
parentbd2d9f8fdfb74f5872f4de1c219dc93c8abe567e (diff)
parentca007e525b5bf52b89bf884f78d79dedf4495564 (diff)
Merge "Docs: VPNs under Android O should promote to the foreground" into oc-dev
am: ca007e525b Change-Id: If2a06d8e8e5fe2034e22c86dabf68bf7d3f79bb0
-rw-r--r--core/java/android/net/VpnService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 2d9860cf0e40..4b79cbb98d8c 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -99,7 +99,7 @@ import java.util.List;
* shut down the tunnel gracefully.</li>
* </ol>
*
- * <p>Services extended this class need to be declared with appropriate
+ * <p>Services extending this class need to be declared with an appropriate
* permission and intent filter. Their access must be secured by
* {@link android.Manifest.permission#BIND_VPN_SERVICE} permission, and
* their intent filter must match {@link #SERVICE_INTERFACE} action. Here
@@ -112,6 +112,13 @@ import java.util.List;
* &lt;/intent-filter&gt;
* &lt;/service&gt;</pre>
*
+ * <p> The Android system starts a VPN in the background by calling
+ * {@link android.content.Context#startService startService()}. In Android 8.0
+ * (API level 26) and higher, the system places VPN apps on the temporary
+ * whitelist for a short period so the app can start in the background. The VPN
+ * app must promote itself to the foreground after it's launched or the system
+ * will shut down the app.
+ *
* @see Builder
*/
public class VpnService extends Service {