Loading core/java/android/net/ConnectivityManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -72,7 +72,6 @@ import com.android.internal.util.Protocol; import libcore.net.event.NetworkEventDispatcher; import java.io.FileDescriptor; import java.io.IOException; import java.io.UncheckedIOException; import java.lang.annotation.Retention; Loading Loading @@ -1958,6 +1957,12 @@ public class ConnectivityManager { return k; } // Construct an invalid fd. private ParcelFileDescriptor createInvalidFd() { final int invalidFd = -1; return ParcelFileDescriptor.adoptFd(invalidFd); } /** * Request that keepalives be started on a IPsec NAT-T socket. * Loading Loading @@ -1988,7 +1993,7 @@ public class ConnectivityManager { } catch (IOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new NattSocketKeepalive(mService, network, dup, socket.getResourceId(), source, destination, executor, callback); Loading Loading @@ -2030,7 +2035,7 @@ public class ConnectivityManager { } catch (IOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new NattSocketKeepalive(mService, network, dup, INVALID_RESOURCE_ID /* Unused */, source, destination, executor, callback); Loading Loading @@ -2067,7 +2072,7 @@ public class ConnectivityManager { } catch (UncheckedIOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new TcpSocketKeepalive(mService, network, dup, executor, callback); } Loading Loading
core/java/android/net/ConnectivityManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -72,7 +72,6 @@ import com.android.internal.util.Protocol; import libcore.net.event.NetworkEventDispatcher; import java.io.FileDescriptor; import java.io.IOException; import java.io.UncheckedIOException; import java.lang.annotation.Retention; Loading Loading @@ -1958,6 +1957,12 @@ public class ConnectivityManager { return k; } // Construct an invalid fd. private ParcelFileDescriptor createInvalidFd() { final int invalidFd = -1; return ParcelFileDescriptor.adoptFd(invalidFd); } /** * Request that keepalives be started on a IPsec NAT-T socket. * Loading Loading @@ -1988,7 +1993,7 @@ public class ConnectivityManager { } catch (IOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new NattSocketKeepalive(mService, network, dup, socket.getResourceId(), source, destination, executor, callback); Loading Loading @@ -2030,7 +2035,7 @@ public class ConnectivityManager { } catch (IOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new NattSocketKeepalive(mService, network, dup, INVALID_RESOURCE_ID /* Unused */, source, destination, executor, callback); Loading Loading @@ -2067,7 +2072,7 @@ public class ConnectivityManager { } catch (UncheckedIOException ignored) { // Construct an invalid fd, so that if the user later calls start(), it will fail with // ERROR_INVALID_SOCKET. dup = new ParcelFileDescriptor(new FileDescriptor()); dup = createInvalidFd(); } return new TcpSocketKeepalive(mService, network, dup, executor, callback); } Loading