| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows constructing a LocalSocket from a FileDescriptor
referring to an already-connected socket. The LocalSocket can
then be used to exchange ancillary filedescriptors and fetch
peer socket credentials for the existing FD.
The fd is not dup'd or closed by the API, and the caller is
responsible for closing it. This is consistent with the
constructor of the related LocalServerSocket class, which also
takes an fd and does not manage its lifecycle.
Bug: 200200870
Test: atest CoreTests:android.net.LocalSocketTest CtsNetTestCases:android.net.cts.LocalSocketTest
Change-Id: I86448ba80475c4563194a4a2d9a0c0bbd0b76444
|
| |
|
|
|
|
| |
Bug: 37013067
Test: existing ones still pass
Change-Id: I78402ebb19a592fc3960eb6200cb5ad436a7b344
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=78422
Change-Id: I0dfbb74334e126062660831a4e01817dde068b56
|
| |
|
|
|
|
| |
Also replaced some JNI code with libcore IO support
Change-Id: I091e2b6b8dd1fec554936c1ffab29e50f0979e4a
|
| | |
|
| | |
|
| |
|