| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few places in libcore consider the local address of an unbound
socket to be Inet4Address.ANY. For example, calling
getLocalAddress on an uncreated Socket will return 0.0.0.0, and
when creating a DatagramSocket, libcore attempts to bind it to
0.0.0.0 unless the caller specifies another address.
On Android, this is incorrect. All native socket filedescriptors
that underpin Java socket objects are created by IoBridge.socket,
and are dual-stack AF_INET6 sockets, not AF_INET sockets. When
such a socket is created, its local address is ::, not 0.0.0.0.
Thus, for example, calling getLocalAddress on a just-created
ServerSocket object will return ::. Binding to 0.0.0.0 is not
even allowed by os.bind, which silently converts it to :: instead
(in inetAddresstoSockaddr).
Therefore, accept reality and use :: instead of 0.0.0.0 in the
Java layer as well. Specifically:
1. Change DatagramSocket's constructors to bind to :: instead of
0.0.0.0. This is a complete no-op, because os.bind() silently
converts 0.0.0.0 into ::. Add a test for the other of the two
codepaths.
2. Change InetSocketAddress so that an uninitialized object has
an IP address of :: and not 0.0.0.0, and update its test. This
is unlikely to break anything short of an app that explicitly
depends on this behaviour, because os.bind() converts 0.0.0.0
to ::, and because any SocketAddress returned by any real
socket will never contain 0.0.0.0 anyway.
3. Change Socket so that calling getLocalAddress() when there is
no underlying socket file descriptor is will return :: instead
of 0.0.0.0. This is more correct, because it's consistent with
sockets that have been created, which will never have a local
address of 0.0.0.0.
Tested: vogar $(find libcore/*Socket*Test*) all passes on device.
Bug: 18094870
Change-Id: I9d60710fe945a99d6a5e65430248a889008ef4b1
|
|\ |
|
|/
|
|
|
|
|
|
|
| |
Was only around to work around perforce issues, and we have
a copy of this file checked in anyway.
Also, gets rid of an unused constant referencing the name.
Change-Id: Iddd5871130d779455f8ff960703945dc1d745e18
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Broken by the move to toybox. Instead of double guessing the
error message, just assume that all "cat" variants (host / target etc.)
output the name of the "bad" paramater to the error stream.
Change-Id: If19fa737e0d3a3dd023185fa23854da3022020fa
|
|\ \
| |/
|/| |
|
|/
|
|
|
|
| |
Make it clear that it's called from native code.
Change-Id: Ia44ba6fe70b6cbb559921553f3b137fd3bb0df2b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also add a single FakeCharsetProvider for unit tests that
does nothing by default, so that we can stub it in for tests
that do care about it and none of our other tests are affected.
Change-Id: I03abb8f1aff53c160935b4cdbeaef764d30f240a
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use of "localhost" to mean "the local host" and not "loopback" was
confusing.
Some docs lacked information.
InetSocketAddress was ambiguous around what was being described. Use
of "this socket" rather than "the socket [endpoint|address|]" makes
it sound like InetSocketAddress is a socket, not a socket's address.
Bug: 19065543
Change-Id: Ic7265464ba39ecace6640b8c4f7a9084ea6ae1d2
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: Ifd6ed8ab22e7fd5d8cb8c9eb28976291d125c0e4
|
|\ \ \
| |_|/
|/| | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fcntlLong works too, but only because of the syscall conventions
happen to place the lower 32 bits of our jlong in the right register.
This change also gets rid of fcntlLong because there aren't any
documented fcntl calls that take a 64 bit integer argument.
Change-Id: I8d187d5b906195fc663675a07a5f116dcd210d16
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Hidden for now, for use from the frameworks.
Change-Id: I30d95b28ecbc422aaa5bf28fb2f288c3ca026493
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's the only place you can run the host tests anyway.
Change-Id: I5fe2b5b74e70a17696baf8ceaacaf4fca52d71ca
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
bug: 18644314
Change-Id: I62e94208392a5f22130ff603bfd1f2f9ec9ef81d
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Iterating over a list of ZipEntries might otherwise do more
work than necessary and create unnecessary garbage. Also, this
is the idiom for such JNI code.
Change-Id: I869289a32e0822bab9ca0345cdc3fc5aaa8adc7e
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 7f6e083f86b711bf905edbf1932f6b35877f9d92.
Breaks an art test, not sure why.
Change-Id: Idbdb03b6e038b73ac07cf3343ff7ddd123d06d01
|
|\ \ \ \ \
| |/ / / / |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Behaves similar to {user.language, user.country} but is a BCP-47
tag that's parsed with Locale.forLanguageTag.
bug: 17691569
Change-Id: I7846a284cdd083233129f9adc0886098ee2ffbb8
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | | |
Change-Id: Ifb2139c49a071dcf2e28e8df54e355321508f4db
|
|\ \ \ \
| |/ / /
|/| | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously the hostname was "localhost", which
resolves to the IPv4 loopback address.
Also fixed the documentation for getAllByName(null)
which has returned the loopback addresses all the way
back to 2009 and not thrown an exception as
suggested in the docs.
Test fixes and new tests included.
Depends on commit 25147416bb105914c3cdf8fd65ca7cc20dae0f3e
Bug: 18991397
Bug: https://code.google.com/p/android/issues/detail?id=96801
Change-Id: I9723516a977e2a3b97412bc1d7e58b36df327feb
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Aims to fix flaky test.
Decreased minimum from 90% to 80%.
Increased maximum from 110% to 120%.
Increased maximum waitMillis from 10ms to 30ms.
Bug: 18788389
(cherry picked from commit 0311cd2be856e4c5872ebbe5ac7e12eac334ad73)
Change-Id: Ie3d84cf71769208e851b9fa7587c62858efdf4dd
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rename isSocket to isSocket$ since it's public @hide.
Make isSocket$ final, even though the class is final, so it's obvious from
grep that you can't accidentally override this. (The other public @hide
methods in this class were already explicitly marked final.)
Change-Id: I90563ca567857fa7d38b7ee8006f8abe6ca2db9a
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Used to release virtual memory for apps with small heaps according
to manifest.
Bug: 18387825
Bug: 17131630
Change-Id: I73cf18c80e7ce76bd627e5a9439dec4277c6af2d
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The original logic was accidentally inverted. This prevented sockets
from being untagged, which would result in cancelled requests stalling
out with sub-optimal TCP ZeroWindow detection instead of sending RST
packets.
Add a comment explaining how this works.
Switch from SO_ERROR (which has a side-effect) to SO_DEBUG (which doesn't).
Add a unit test.
Bug: 18706592
Change-Id: Ib822a9727668908e04f87a6deb104dcebf333f05
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
If a client/server gets a close alert during a handshake, it should give
a sane error message instead of something that is confusing to the developer.
Bug: 18758595
Change-Id: I5d8d7dcb74fed4ff0ab943b5dc666819ec076e31
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
bug: 18644314
Change-Id: I7eaf8f636c22e6c429af0686e3445eae3cd00d96
|
|\ \ \ |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The position of the buffer should match the number of bytes produced or
consumed. Make sure all the tests have this condition on the handshake.
Bug: 18921387
Change-Id: I8d248b2ac189d801586510fb5aca2e3bd6701ffe
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | | |
Bug: https://code.google.com/p/android/issues/detail?id=92930
Change-Id: Id3bc22d16cf4f493e937ebc76ebacd6a01b6f454
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| | |
Bug: https://code.google.com/p/android/issues/detail?id=93714
Change-Id: I986c6af2bf8c54de06c95b2fd0d53709a7c9d573
|
|\ \
| |/
|/| |
|