Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64126bc3 authored by Sreeram Ramachandran's avatar Sreeram Ramachandran Committed by Android (Google) Code Review
Browse files

Merge "Allow VPN interfaces to be put into blocking mode." into lmp-dev

parents 57eea0f7 cc26b4cc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17517,6 +17517,7 @@ package android.net {
    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 setBlocking(boolean);
    method public android.net.VpnService.Builder setConfigureIntent(android.app.PendingIntent);
    method public android.net.VpnService.Builder setMtu(int);
    method public android.net.VpnService.Builder setSession(java.lang.String);
+14 −0
Original line number Diff line number Diff line
@@ -567,6 +567,20 @@ public class VpnService extends Service {
            return this;
        }

        /**
         * 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