summaryrefslogtreecommitdiffstats
path: root/luni/src/main
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "Implementation of MulticastChannel."Neil Fuller2014-03-0318-15/+1132
|\ \ \ | |/ / |/| |
| * | Implementation of MulticastChannel.Neil Fuller2014-02-2818-15/+1132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: ProtocolFamily / StandardProtocolFamily / DatagramChannel.open(ProtocolFamily) have not been implemented. There is a related change to libnativehelper that must be merged at the same time to avoid build breakage. See https://android-review.googlesource.com/#/c/81371/ Bug: 12464155 Change-Id: I07fc049b429a2d373e9bd7b07149632f5cd69f9d
* | | Merge "Tests and docs updates for OkHttp update."Neil Fuller2014-03-031-4/+8
|\ \ \
| * | | Tests and docs updates for OkHttp update.Neil Fuller2014-02-281-4/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OkHttp has made various changes. This fixes the known breakages before the update is applied. 1) Chunk length is no longer honored exactly. The API docs have been updated to reflect this. 2) testConnectViaHttpsWithSSLFallback simulated an SSL handshake failure by closing the socket. This is no longer sufficient to trigger the fallback behavior after OkHttp change 46a0852. testSslFallback tests an actual handshake failure and provides coverage. testConnectViaHttpsWithSSLFallback has therefore been removed. 3) testRetryableRequestBodyAfterBrokenConnection is similar to testConnectViaHttpsWithSSLFallback. Previously it passed because of the SSL fallback behavior. That fallback no longer happens. It is possible this was actually supposed to be checking the internal RetryableOutputStream. Now OkHttp does not retry connections after the connection is made it is not possible to test the request body is "replayed" to the server. 4) testNonRetryableRequestBodyAfterBrokenConnection: Related to 3 above. It was testing that fixed length request bodies are not retryable. This test continues to pass with OkHttp but only because it fails to retry generally, not because of the request body and therefore the test is misleading. Change-Id: If430bce75ad5b2fd5ace38d0f65d9c4af56b88df
* | | Merge "Add unpadded array allocations."Ian Rogers2014-03-011-6/+6
|\ \ \ | |/ / |/| |
| * | Add unpadded array allocations.Ian Rogers2014-02-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unpadded array allocations avoid unused bytes following arrays. API conventions follow those of newNonMovableArray. Dalvik implementation assume dlmalloc allocation properties, ART implementation is handled by resizing the array post-allocation: https://android-review.googlesource.com/83670 Add VMRuntimeTest to check the properties of the array allocation routines. Change java.lang.reflect.Array.newInstance to compare more probable array types before less probable ones. Bug: 13028925. Change-Id: Icf6bfb1aa5ad4faa062b393082c689b6118a84b5
* | | Add a stub set24HourTimeFormat function for the framework.Narayan Kamath2014-02-271-0/+6
|/ / | | | | | | | | | | | | ActivityThread will call through to DateFormat.set24HourTimeFormat during the app startup flow, or when the 24 hour setting changes. Change-Id: I2b6a10ff66d86e780779c46c1665f77cdef66305
* | Merge "Improve error message when attempting to open an empty zip"Paul Duffin2014-02-261-0/+3
|\ \
| * | Improve error message when attempting to open an empty zipPaul Duffin2014-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug report states that the behaviour of ZipFile has changed between 4.3 and 4.4 when opening an empty zip file. I did some investigation and it appears as though the reference implementation also throws an exception in that case so I decided that 4.4 is working as designed. However, to make it clearer I made a minor change to explicitly check for an empty zip file so that we can report a slightly improved message explaining that they are not supported. I added a test for various forms of empty streams and zip files and removed part of an older test from harmony tests as it is no longer necessary. Bug: https://code.google.com/p/android/issues/detail?id=65380 Change-Id: I1f2fcbf6bbaedb7dbccf8dd4f1cec4e330274524
* | | Corrected documentation of OutputStreamWriter.close()Paul Duffin2014-02-261-2/+2
|/ / | | | | | | | | | | | | | | Made it clear that close() does not flush the underlying stream. That behaviour is in line with reference implementation. Bug: https://code.google.com/p/android/issues/detail?id=65245 Change-Id: Id84986c58bc86cc0b1d4ec5b6c1a2fd925c39c18
* | Update BN to work when sizeof(BN_ULONG) != 4.Colin Cross2014-02-211-51/+74
| | | | | | | | Change-Id: Ifc1cdf17c7198624c217afc82c43819b71660d53
* | Fix NativeBreakIterator_cloneImpl return type.Elliott Hughes2014-02-211-1/+1
| | | | | | | | Change-Id: I44e36a0312973de83a2ee7d09483ad911e167604
* | When decoding enum annotation value, treat it as a field name, not enum valueBrian Carlstrom2014-02-201-4/+14
| | | | | | | | | | Bug: 13078746 Change-Id: I9971841aee3a061523f7ef4744de8042269c1763
* | Addition of 1.7 methods to URLConnection.Neil Fuller2014-02-193-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | URLConnection.getHeaderLong() and URLConnection.getContentLengthLong(). These methods are required by okhttp. Changed JarURLConnectionImpl.getContentLength() to return -1 when the size of an entry cannot be represented as an int. Previously it would have returned a corrupted, possibly negative, value due to a cast. Changed FileURLConnection.getContentLength() to return -1 when the size of the file cannot be represented as an int. Previously it would have returned a corrupted, possibly negative, value due to a cast. Change-Id: Ib43e68a2536c2602b4c7ee0cda68fa1f90045f57
* | Fix Preferences related tests, document limitations.Narayan Kamath2014-02-183-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The default Preferences factory methods are entirely useless on android. "java.home" points to a location in a read-only partition and "user.home" is set to "/" which apps are not allowed to write to. A strong warning has been added against these methods. - We continue to support the underlying default preferences implementation (even though there's no way to use the impl. directly except by reflection) to help apps transition *just in case* they were manually massing "user.home" and "java.home". - Add a fake preferences factory that allows us to use a new (temporary) preferences root for every test. Fixed a test interdependency issue that was uncovered by this change. Change-Id: I6019441c65b398376d84264f1e4c9776507533eb
* | Make system properties read only.Narayan Kamath2014-02-171-21/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that some parts of the system libraries (and the runtime) assume that these properties are immutable. This change enforces that notion and makes behaviour a lot more predictable. This is not a backwards compatible change, but based on analysis of code available to me I couldn't find any instances where this change would break any application. Has the side effect of fixing.. bug: 12491204 bug: 12491159 Change-Id: I60c73713c97a4721d0b9781010333a9e9c883534
* | Remove use of file absolute paths.Narayan Kamath2014-02-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An absolute path is derived from a relative path by appending the value of "user.dir" to it. "user.dir" is populated by the VM by calling getcwd(3). All apps forked from zygote end up with a "user.dir" (and a current working directory) value of "/". This, along with change 417621196b855 (which prevents "user.dir" from being changed by apps) will make file handling a lot more consistent. In particular 417621196 ensures that - The output of getAbsolutePath can never change for a given relative path. - File.getPath() and File.getAbsolutePath() become interchangeable wrt. lower level (Libcore.os) APIs. Change-Id: I5598a2b1c5de65b59d69324f98656ffe031290f0
* | Tidy up Console, fix ConsoleTestNarayan Kamath2014-02-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a more specific exception type. The use of IOException led me to believe that the constructor was performing i/o ops on the underlying file descriptors. (They were not.) - Delete a test that asserted that System.console() was always non-null. It will be non-null only for command line apps (tests run from vogar), and not for "regular" android apps (tests run from CTS) because stdin / stdout will not be TTY devices regular apps. bug: 12490236 Change-Id: I8c1e37bcb21de5862dc8ea198852995a020437a7
* | Late binding: support NullCipherKenny Root2014-02-131-1/+11
| | | | | | | | | | | | | | NullCipher is a special case that needs to never reset its spiImpl Bug: 12971024 Change-Id: I0e1e4a6525808959e068810c3a8c239baacf8a95
* | Late binding: support children of SignatureKenny Root2014-02-121-1/+6
| | | | | | | | | | | | | | | | The way Signature is a class of SignatureSpi allows you to register a provider that returns a direct child of Signature. Support that by checking if it's a subclass before trying to wrap it in SignatureImpl. Bug: 12971079 Change-Id: I76b03f0962fe1b6ae95f205588c17d54b4bf504c
* | Adding additional methods to NetworkChannel.Neil Fuller2014-02-1112-24/+767
| | | | | | | | | | | | | | | | | | Adding NetworkChannel.supportedOptions(), NetworkChannel.getOption(), NetworkChannel.setOption(). A lot of the changes are in documentation and tests. Bug: 12464155 Change-Id: Ifa56843a8823b6b9cbd262409adc2450b401c654
* | Implementing bind() and getLocalAddress() for NIO2.Neil Fuller2014-02-1111-68/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces NetworkChannel, but only bind() and getLocalAddress() methods. To avoid breaking existing Android applications that extend ServerSocketChannel, DatagramChannel and SocketChannel the methods have been added with concrete implementations that throw exceptions rather than leaving them abstract. In channel tests, usages of channel.socket().bind() and channel.socket().getLocalSocketAddress() have been changed to channel.bind() and channel.getLocalAddress(), since the behavior is close enough and the tests should be written against the channel APIs as much as possible. Tests have been added for new methods. Removed further overriding in DatagramChannelImpl.DatagramSocketAdapter and SocketChannelImpl.SocketAdapter which revealed some bugs and lack of clarity in the docs for the socket methods: Improved the documentation for DatagramSocket.getLocalAddress(), DatagramSocket.getLocalSocketAddress(), ServerSocket.getInetAddress(), ServerSocket.getLocalPort(), ServerSocket.getLocalSocketAddress(), Socket.getLocalAddress(), Socket.getLocalPort(), Socket.getLocalSocketAddress(). These methods treat special cases differently. Fixed a bug in DatagramSocket.getLocalSocketAddress() where it would incorrect throw an exception if the socket has been closed, which contradicts the (updated) documentation and the RI. It now returns null. Added tests. Fixed a bug in Socket.close(): a closed socket would still report as being connected. Added tests. Fixed a bug in Socket.startupSocket() - the socket was recording it was being bound, but was not updating the cached local address. This method is called during ServerSocketChannel.accept() and would cause the socket to report its local address as being the wildcard address, when it is not. Added a test. Change-Id: Ibec8527e1c72597e268d23e6c1f03eb16e46cdc4 Bug: 12464155
* | Merge "Avoid running Runtime.gc() until we need to run finalization."Mathieu Chartier2014-02-071-1/+39
|\ \
| * | Avoid running Runtime.gc() until we need to run finalization.Mathieu Chartier2014-02-041-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents excessive explicit GC which are called from apps to get good GC behavior on Dalvik. Calling System.gc() does not help on ART since GC for alloc is much rarer. If running finalizers is requested following a System.gc we remember that a GC was requested and perform it ahead of finalization. Bug: 12004934 Change-Id: Id1343ce8b5378c5f53c1e5649c06ddd045f56a3b
* | | Merge "Late binding: add support to Mac"Kenny Root2014-02-071-26/+133
|\ \ \
| * | | Late binding: add support to MacKenny Root2014-02-061-26/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for late binding (or delayed selection) to the Signature class. This allows the selection of the KeyAgreementSpi based on what kind of Key class is used to init(...) Change-Id: I8a14ac138e09d5bf2b925b5fa288c9adab540b76
* | | | Merge "Fix JNI issues in NativeCollation."Narayan Kamath2014-02-071-15/+83
|\ \ \ \ | |/ / / |/| | |
| * | | Fix JNI issues in NativeCollation.Narayan Kamath2014-02-071-15/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure the jchar array (and the corresponding input string) are valid throughout the iteration, not just during the JNI call that creates the iterator. bug: 12817544 Change-Id: I8dda0a7238a743da0d0e2b4c956ec0806ce3555b
* | | | Late binding: add support to KeyAgreementKenny Root2014-02-061-33/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for late binding (or delayed selection) to the Signature class. This allows the selection of the KeyAgreementSpi based on what kind of Key class is used to init(...) Change-Id: I7012e188cf1daf3e7e74b424de80e3ea44cb9ab4
* | | | Late binding: reinitializing causes selectionKenny Root2014-02-062-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Sun PKCS#11 document says that calling initialization with different keys causes a new provider and service will be chosen. Currently the RI fails these tests, but it seems like the correct thing to do. Change-Id: Ie40d8ef5f0996477e157ffbc0d9f145448df3df1
* | | | Late binding: fix refactor mistake in CipherKenny Root2014-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring led to the tool changing "continue;" into "return sap;" which will give you an invalid configuration. Change-Id: I4b1a3b3fc9ffdf489739b4a1ef65276ca021f1f6
* | | | Late binding: add support to SignatureKenny Root2014-02-062-52/+131
|/ / / | | | | | | | | | | | | | | | | | | | | | This adds support for late binding (or delayed selection) to the Signature class. This allows the selection of the SignatureSpi based on what kind of Key class is used to initSign(...) or initVerify(...) Change-Id: I9d397a3aab48b49dfdf91af4ab7caceeff4822d8
* | | Merge "All our structs should have a public constructor."Elliott Hughes2014-02-064-4/+4
|\ \ \
| * | | All our structs should have a public constructor.Elliott Hughes2014-02-054-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we're offering people the ability to mock the OS out, they need to be able to construct made-up results. Change-Id: I17883ee19abcefddc923e132cbbe0b82fc7e5bc1
* | | | Merge "Make ICU.localeFromIcuLocaleId public."Narayan Kamath2014-02-061-3/+1
|\ \ \ \
| * | | | Make ICU.localeFromIcuLocaleId public.Narayan Kamath2014-02-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was package private for testing, but the CTS runner uses different class loaders for the implementation and the test so that's not good enough. bug: 12905565 Change-Id: I6500424333f1e6d4139bcae7339c784f7b4bcd1c
* | | | | Only offer the CAP_* constants on bionic.Elliott Hughes2014-02-053-12/+11
| |/ / / |/| | | | | | | | | | | | | | | | | | | It's too hard and insufficiently worthwhile to bother with glibc. Change-Id: Ic2d1c5242c20a197b713becbcdce09993abe0f5c
* | | | Revert "Revert "ExpatParser LP64 fixes.""Elliott Hughes2014-02-052-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d88231f770f7459dc174aa970e305aa5f16f9f04. Change-Id: Iac6b50221aa1e4cfe8514ea693a4289d74e118de
* | | | Improve JCE getInstance documentationKenny Root2014-02-0517-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Provider instance is supplied, it will be asked directly to satisfy the request. Make that clear in the documentation. Change-Id: I06b945a540b99db970b96a37e312f1e0fae93bf9
* | | | Merge "Revert "ExpatParser LP64 fixes.""Elliott Hughes2014-02-052-4/+4
|\ \ \ \
| * | | | Revert "ExpatParser LP64 fixes."Elliott Hughes2014-02-052-4/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a8a1e201e415abfd6b5ae4fed98c8aa491e15af9. This causes YouTube to crash on launch. Reverting to give myself more time to investigate. Change-Id: I9ee107383a4f206ca83dd267baad77445eba3fce
* | | | Late binding: supplied Provider should be usedKenny Root2014-02-052-54/+51
|/ / / | | | | | | | | | | | | | | | | | | | | | If a program supplies a Provider object, it should be used instead of looking at the registered providers. Bug: 12890254 Change-Id: Ia4d1ac88a1ed20ab6ad6a11d2d5f53ee51310544
* | | ExpatParser LP64 fixes.Elliott Hughes2014-02-032-4/+4
| | | | | | | | | | | | | | | | | | | | | Change-Id: I17ba32b6147b048f3cace0b2d7283b1c9d74f776 Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
* | | Add aarch64 to the architectures without alignment restrictions.Elliott Hughes2014-02-031-2/+2
| | | | | | | | | | | | Change-Id: I1ebc76b7ed08e177e97cd1e4d866347b7600057b
* | | Be more consistent with L suffixes in NIOAcccess.Elliott Hughes2014-02-031-15/+2
| | | | | | | | | | | | | | | | | | | | | Change-Id: I664cdc40da85fa7e300a7e34ab970607a4cc0794 Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
* | | NativeBreakIterator LP64 fixes.Elliott Hughes2014-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | Change-Id: I8886d73d9a83babca0f440177a9f3fd3eb70e38f Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
* | | NativeCollation LP64 fixes.Elliott Hughes2014-02-032-2/+2
| | | | | | | | | | | | | | | | | | | | | Change-Id: Idf5100fdfd1915439029f5d42cf4b84d64f457a0 Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
* | | Add posix_fallocate to Libcore.os.Elliott Hughes2014-02-035-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | (The Java API takes longs for the off_t arguments, and uses posix_fallocate64 behind the scenes.) Bug: 5287571 Change-Id: I48566d8720c6b41ab42a402eeb322d054d2029ea
* | | Move the hidden File.readlink into Libcore.os.Elliott Hughes2014-01-317-23/+25
| | | | | | | | | | | | Change-Id: Ia983909e62d3806027dff870f0148dd07c31bf01
* | | Merge "Rename our 'realpath' because it isn't the same as realpath(3)."Elliott Hughes2014-01-314-162/+163
|\ \ \