Merge "Add @NonNull annotation to set proxy on VPN parameter." am: 909baeddfa

am: 121dab8e6b

Change-Id: Ic732bf56e8603ffe215d7689e2101e3c6f6c0b25
This commit is contained in:
Irina Dumitrescu
2019-02-26 22:19:29 -08:00
committed by android-build-merger
2 changed files with 3 additions and 2 deletions

View File

@@ -27853,7 +27853,7 @@ package android.net {
method public android.os.ParcelFileDescriptor establish();
method public android.net.VpnService.Builder setBlocking(boolean);
method public android.net.VpnService.Builder setConfigureIntent(android.app.PendingIntent);
method public android.net.VpnService.Builder setHttpProxy(android.net.ProxyInfo);
method public android.net.VpnService.Builder setHttpProxy(@NonNull android.net.ProxyInfo);
method public android.net.VpnService.Builder setMetered(boolean);
method public android.net.VpnService.Builder setMtu(int);
method public android.net.VpnService.Builder setSession(String);

View File

@@ -19,6 +19,7 @@ package android.net;
import static android.system.OsConstants.AF_INET;
import static android.system.OsConstants.AF_INET6;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
@@ -512,7 +513,7 @@ public class VpnService extends Service {
* Sets an HTTP proxy for the VPN network. This proxy is only a recommendation
* and it is possible that some apps will ignore it.
*/
public Builder setHttpProxy(ProxyInfo proxyInfo) {
public Builder setHttpProxy(@NonNull ProxyInfo proxyInfo) {
mConfig.proxyInfo = proxyInfo;
return this;
}