Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -12446,7 +12446,7 @@ package android.net { method public android.net.LocalSocketAddress getLocalSocketAddress(); } public class LocalSocket { public class LocalSocket implements java.io.Closeable { ctor public LocalSocket(); method public void bind(android.net.LocalSocketAddress) throws java.io.IOException; method public void close() throws java.io.IOException; core/java/android/net/LocalSocket.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net; import java.io.Closeable; import java.io.FileDescriptor; import java.io.IOException; import java.io.InputStream; Loading @@ -26,7 +27,7 @@ import java.net.SocketOptions; * Creates a (non-server) socket in the UNIX-domain namespace. The interface * here is not entirely unlike that of java.net.Socket */ public class LocalSocket { public class LocalSocket implements Closeable { private LocalSocketImpl impl; private volatile boolean implCreated; Loading Loading @@ -167,6 +168,7 @@ public class LocalSocket { * * @throws IOException */ @Override public void close() throws IOException { implCreateIfNeeded(); impl.close(); Loading services/java/com/android/server/connectivity/Vpn.java +4 −10 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ import java.io.OutputStream; import java.nio.charset.Charsets; import java.util.Arrays; import libcore.io.IoUtils; /** * @hide */ Loading Loading @@ -228,11 +230,7 @@ public class Vpn extends INetworkManagementEventObserver.Stub { mConnection = connection; mInterface = interfaze; } catch (RuntimeException e) { try { tun.close(); } catch (Exception ex) { // ignore } IoUtils.closeQuietly(tun); throw e; } Log.i(TAG, "Established by " + config.user + " on " + mInterface); Loading Loading @@ -442,11 +440,7 @@ public class Vpn extends INetworkManagementEventObserver.Stub { // We assume that everything is reset after stopping the daemons. interrupt(); for (LocalSocket socket : mSockets) { try { socket.close(); } catch (Exception e) { // ignore } IoUtils.closeQuietly(socket); } } Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -12446,7 +12446,7 @@ package android.net { method public android.net.LocalSocketAddress getLocalSocketAddress(); } public class LocalSocket { public class LocalSocket implements java.io.Closeable { ctor public LocalSocket(); method public void bind(android.net.LocalSocketAddress) throws java.io.IOException; method public void close() throws java.io.IOException;
core/java/android/net/LocalSocket.java +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.net; import java.io.Closeable; import java.io.FileDescriptor; import java.io.IOException; import java.io.InputStream; Loading @@ -26,7 +27,7 @@ import java.net.SocketOptions; * Creates a (non-server) socket in the UNIX-domain namespace. The interface * here is not entirely unlike that of java.net.Socket */ public class LocalSocket { public class LocalSocket implements Closeable { private LocalSocketImpl impl; private volatile boolean implCreated; Loading Loading @@ -167,6 +168,7 @@ public class LocalSocket { * * @throws IOException */ @Override public void close() throws IOException { implCreateIfNeeded(); impl.close(); Loading
services/java/com/android/server/connectivity/Vpn.java +4 −10 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ import java.io.OutputStream; import java.nio.charset.Charsets; import java.util.Arrays; import libcore.io.IoUtils; /** * @hide */ Loading Loading @@ -228,11 +230,7 @@ public class Vpn extends INetworkManagementEventObserver.Stub { mConnection = connection; mInterface = interfaze; } catch (RuntimeException e) { try { tun.close(); } catch (Exception ex) { // ignore } IoUtils.closeQuietly(tun); throw e; } Log.i(TAG, "Established by " + config.user + " on " + mInterface); Loading Loading @@ -442,11 +440,7 @@ public class Vpn extends INetworkManagementEventObserver.Stub { // We assume that everything is reset after stopping the daemons. interrupt(); for (LocalSocket socket : mSockets) { try { socket.close(); } catch (Exception e) { // ignore } IoUtils.closeQuietly(socket); } } Loading