Allow VPN interfaces to be put into blocking mode.
New API with stub implementation to be filled out later.
Bug: 12879610
Change-Id: Iff711994dec4598c74fe11447c8c670004c1188c
diff --git a/core/java/android/net/VpnService.java b/core/java/android/net/VpnService.java
index 5d61de2..0967fa8 100644
--- a/core/java/android/net/VpnService.java
+++ b/core/java/android/net/VpnService.java
@@ -568,6 +568,20 @@
}
/**
+ * Sets the VPN interface's file descriptor to be in blocking/non-blocking mode.
+ *
+ * By default, the file descriptor returned by {@link #establish} is non-blocking.
+ *
+ * @param blocking True to put the descriptor into blocking mode; false for non-blocking.
+ *
+ * @return this {@link Builder} object to facilitate chaining method calls.
+ */
+ public Builder setBlocking(boolean blocking) {
+ // TODO
+ return this;
+ }
+
+ /**
* Create a VPN interface using the parameters supplied to this
* builder. The interface works on IP packets, and a file descriptor
* is returned for the application to access them. Each read