Merge "Allow a VPN to be declared bypassable."
This commit is contained in:
committed by
Android (Google) Code Review
commit
482edab3ab
@@ -16850,6 +16850,7 @@ package android.net {
|
||||
method public android.net.VpnService.Builder addRoute(java.net.InetAddress, int);
|
||||
method public android.net.VpnService.Builder addRoute(java.lang.String, int);
|
||||
method public android.net.VpnService.Builder addSearchDomain(java.lang.String);
|
||||
method public android.net.VpnService.Builder allowBypass();
|
||||
method public android.net.VpnService.Builder allowFamily(int);
|
||||
method public android.os.ParcelFileDescriptor establish();
|
||||
method public android.net.VpnService.Builder setConfigureIntent(android.app.PendingIntent);
|
||||
|
||||
@@ -552,6 +552,21 @@ public class VpnService extends Service {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows all apps to bypass this VPN connection.
|
||||
*
|
||||
* By default, all traffic from apps is forwarded through the VPN interface and it is not
|
||||
* possible for apps to side-step the VPN. If this method is called, apps may use methods
|
||||
* such as {@link ConnectivityManager#setProcessDefaultNetwork} to instead send/receive
|
||||
* directly over the underlying network or any other network they have permissions for.
|
||||
*
|
||||
* @return this {@link Builder} object to facilitate chaining of method calls.
|
||||
*/
|
||||
public Builder allowBypass() {
|
||||
// TODO
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a VPN interface using the parameters supplied to this
|
||||
* builder. The interface works on IP packets, and a file descriptor
|
||||
|
||||
Reference in New Issue
Block a user