summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Irina Dumitrescu <irinaid@google.com> 2019-02-20 18:17:06 +0000
committer Irina Dumitrescu <irinaid@google.com> 2019-02-27 01:06:00 +0000
commit5155a2d7e44dfa6b85f429b8b492c12a9465f8d1 (patch)
treea69f48f5e1a1e64fff345b1fb647d2229b587ae8
parent820cfa422cc600da9da9f7f098a7d4f5e63eff0f (diff)
Add @NonNull annotation to set proxy on VPN parameter.
Test: manual Bug: 124883120 Change-Id: Ifb4bd98a69a006220b1a824033395fc6f12ea6ce
-rwxr-xr-xapi/current.txt2
-rw-r--r--core/java/android/net/VpnService.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt
index d9d61b5dbeed..84f209c4b89f 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -27855,7 +27855,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);
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 784f23311103..ebb1ae4bb795 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -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;
}