summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2017-01-04 10:07:25 +0000
committerNeil Fuller <nfuller@google.com>2017-01-04 10:33:18 +0000
commitb08c7bc0bdc48ae95be2697ca27ea89a9dd92c3e (patch)
tree150b279b43f2d8e4c3731face92e5cfd48874ddb /tools/aapt2/diff/Diff.cpp
parent80ff5ecd4a4076e992c4fca93648b48f16f6cd03 (diff)
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
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions