History log of /frameworks/base/core/java/android/net/LocalServerSocket.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7fd724611b8113c7f584c603d14fd44071cad799 06-Jan-2017 Neil Fuller <nfuller@google.com> Refactor RFCOMM / BluetoothSocket usage of LocalSocket

LocalSocket is used by BluetoothSocket. BluetoothSocket
passes a pre-created file descriptor to LocalSocket that
is then given to the LocalSocketImpl.

Commit b08c7bc0bdc48ae95be2697ca27ea89a9dd92c3e broke the
behavior. Commit 7a8c36aa4e6a1b5e48f0ee5a787f10bcfece7587
put in a minimal fix.

This change tidies up LocalSocket and associated classes
and replaces a specialist constructor with a factory method
to highlight the special case. While there an unnecessary
exception has been removed.

Bug: 34111534
Test: Boot device
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I4ba2f2d9ea361a950ff8bc8d64fc800d998c3210
/frameworks/base/core/java/android/net/LocalServerSocket.java
b08c7bc0bdc48ae95be2697ca27ea89a9dd92c3e 04-Jan-2017 Neil Fuller <nfuller@google.com> Set isConnected, isBound, implCreated on server-side LocalSockets

Previously LocalServerSocket.accept() would return a LocalSocket
instance with isConnected, isBound and implCreated set to false.
[implCreated determines whether impl.create() needs to called].

A socket created via accept() in this way is implicitly bound
and connected. impl.create() does not need to be called because
impl.accept(LocalSocketImpl s) is called instead and has the same
effect (s.fd and s.mFdCreatedInternally set correctly).

This change modifies the behavior so that the flags are now all
set to true in this case and isBound() and isConnected() will
now return the correct answer.

Attempts to call bind() and connect() will still throw
IOException as before, but with a different exception message.

Correctly setting implCreated in LocalSocket means that
LocalSocketImpl.create() will no longer be called for accept()
created sockets and no longer needs to treat the "fd != null"
case as a no-op: we can now assert that there must be no fd set
when create() is called as we will no longer call it with sockets
created using accept().

Bug: https://code.google.com/p/android/issues/detail?id=35942
Test: Device boot
Test: vogar --mode app_process cts/tests/tests/net/src/android/net/cts/LocalServerSocketTest.java
Test: vogar --mode app_process cts/tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I3ac55439412e84501ae7c5ae6c9976e03b2d6fc5
/frameworks/base/core/java/android/net/LocalServerSocket.java
0adcf15ad8b41559b50b3cbde6a103582f8c95b8 09-Dec-2014 Elliott Hughes <enh@google.com> Fix typo.

Bug: https://code.google.com/p/android/issues/detail?id=78422
Change-Id: I0dfbb74334e126062660831a4e01817dde068b56
/frameworks/base/core/java/android/net/LocalServerSocket.java
e7d309a929bf87a5752cd1fb2d48c72e47a671a2 16-Jul-2013 Mike Lockwood <lockwood@google.com> LocalSocket: Add support for SOCK_DGRAM and SOCK_SEQPACKET

Also replaced some JNI code with libcore IO support

Change-Id: I091e2b6b8dd1fec554936c1ffab29e50f0979e4a
/frameworks/base/core/java/android/net/LocalServerSocket.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/LocalServerSocket.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/LocalServerSocket.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/net/LocalServerSocket.java