summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Build fix: Remove reference to deleted java_io_Console functionNeil Fuller2014-06-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was deleted by 1f3014901704f3ae81538773b8a0b382945adc8d Bug: 12491103 Change-Id: If75f1f05d6a72cac7b7a86b7616bae870615452e
* | | | Merge "Unimplement Console.readPassword and remove test"Neil Fuller2014-06-204-93/+4
|\ \ \ \ | |/ / /
| * | | Unimplement Console.readPassword and remove testNeil Fuller2014-06-234-93/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConsoleTest.test_readPassword* fails CTS tests. Context: Under standard Android applications the System.console() method will return null. The Console.readPassword() method must turn off echo. Under automated tests the ConsoleTest is exercising a Console object with fake stdout / stdin streams to get around the absence of a System.console(). setEcho() is hardcoded to use stdin / stdout in the native code. Under the test runners stdin / stdout are not connected to a TTY leading to a ENOTTY. Under Android readPassword is unimportant. Rather than leaving untested security-related code the password methods are being unimplemented. It is unlikely this code has ever been used on Android given the absence of a System Console instance. Bug: 12491103 Change-Id: I755c014e6b53236f5bef0535be137dd721918b44
* | | | Merge "Assert that setEnabledProtocols/CipherSuites copy their inputs."Alex Klyubin2014-06-203-0/+60
|\ \ \ \
| * | | | Assert that setEnabledProtocols/CipherSuites copy their inputs.Alex Klyubin2014-06-193-0/+60
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSLSocket, SSLServerSocket, and SSLEngine offer setEnabledProtocols and setEnabledCipherSuites methods which take an array of protocols or cipher suites as input. If these methods store references to the input arrays, then the internal state (lists of enabled protocols and cipher suites) of SSLSocket, SSLServerSocket, and SSLEngine could be modified without going through the setter methods of these classes. Correct implementations of these methods should store copies of the input arrays. Bug: 15753142 Change-Id: Ia5248050d81320ed1da99892278bd60872605f52
* | | | Merge "Assert the updated list of supported ECDHE-PSK cipher suites."Alex Klyubin2014-06-181-2/+2
|\ \ \ \
| * | | | Assert the updated list of supported ECDHE-PSK cipher suites.Alex Klyubin2014-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 15073623 Change-Id: I427c99f4c1c72690d95e5a3c63763631c41ddae2
* | | | | Merge "Fix for currency symbol coming from the default locale"Neil Fuller2014-06-174-19/+52
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Fix for currency symbol coming from the default localeNeil Fuller2014-06-194-19/+52
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NumberFormat.setCurrency() (actually DecimalFormat) was using currency.getSymbol() without passing the format's locale. This caused the default Locale to be used to look up the symbol. The fix uses the format locale, not the default. A test has been added to demonstrate the problem / fix. To avoid having the NativeDecimalFormat know about the locale class, the symbol is passed as an argument rather than the Currency object. This is an internal API. Making this change showed an issue with Currency.getSymbol(): For Locales without a country the currency code would be returned and not a symbol. ICU provides language-level symbols so this was not the best we could do. Since the code was previously using the default Locale, and the default locale usually has a country it was not previously obvious. testBug71369 broke because of this second issue. The code is also fixed here. This was discovered while investigating bug 71369 but is not related. Change-Id: If0ce280aefb042fe8f7ca126cced090b9268a866
* | | | Merge "Fix CurrencyTest.test_getSymbol for unknown variants"Neil Fuller2014-06-173-41/+60
|\ \ \ \
| * | | | Fix CurrencyTest.test_getSymbol for unknown variantsNeil Fuller2014-06-183-41/+60
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior of CurrencyTest.getSymbol has changed since K for unrecoginzed locales. Commit de0eb683370d789e7bb25673b350b8dbf2ba5d69 now means the ICU default locale is set when the Java default locale is changed. Previously it would have been left unset and would have fallen back to using the system settings (most likely US or UK English during tests). The test is setting the Java default locale to "kr-KR" (a locale unrecognized by ICU) and requesting the currency symbol for USD for locale "kr-KR" (still unrecognized by ICU). Before the commit: Because the kr-KR argument is unrecognized ICU tries the ICU default (which was unset and so picked system setting of en). It returned "$". After the commit: As above, but now the ICU default is set to kr-KR. Since there is no entry for USD in the default it falls back to "root", and returns the value found there: "US$". Behavior when the default locale is unrecognized is edge-case and arguably it is no more / less correct before or after this commit. The test has been updated to reflect the new value + some tidy up of the test generally. This change also contains a more focused test that demonstrates the behavior in ICU and adds documentation to make ICU slightly clearer. Arguably neither the new ICUTest nor the existing CurrencyTest code should exist because they assert edge-case behavior that Android may wish to change in future. Bug: 14821275 Change-Id: I8beb6004b0c37d2fe59855d13d2c8e2e6fe1c530
* | | | Merge "Removing tests that test the SqlLite API directly."Neil Fuller2014-06-1714-3226/+145
|\ \ \ \
| * | | | Removing tests that test the SqlLite API directly.Neil Fuller2014-06-1714-3226/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the tests were testing that the SqlLite Java API works. Android does not ship with the SQLLite code as a public API so these have been removed. Some of the tests were testing JDBC APIs associated with Connection, Driver and DriverManager behavior so these have been retained and moved to libcore/java/sql/DriverTest.java / ConnectionTest.java Change-Id: I97ec05591019505f527ee134177c5637bbd08538
* | | | | Merge "CTS fix: Signature2Test.test_clone()"Neil Fuller2014-06-172-1/+11
|\ \ \ \ \
| * | | | | CTS fix: Signature2Test.test_clone()Neil Fuller2014-06-182-1/+11
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it would throw a NullPointerException. Fixing that rendered the Signature cloneable and the test assertions failing. The test now passes but is of questionable value except to prove the absence of RuntimeException. Change-Id: I2a5b160f0914837b37b801e16b8a3717d00fd94e
* | | | | Merge "Dalvik is dead, long live Dalvik! DO NOT MERGE"Brian Carlstrom2014-06-1824-11128/+34
|\ \ \ \ \
| * | | | | Dalvik is dead, long live Dalvik! DO NOT MERGEBrian Carlstrom2014-06-1824-11128/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | croot cd libcore repo start dalvik-is-dead-long-live-dalvik . repo sync -c . git rm -r libdvm git add JavaLibrary.mk (after removing libdvm references, adding explict core-libart references) git add Docs.mk (after replacing references to libdvm with libart) git add benchmarks/Android.mk (after adding explict core-libart references) git add Android.mk (after removing dalvik-host target) git commit -a -m 'Dalvik is dead, long live Dalvik! DO NOT MERGE' Bug: 14298175 Change-Id: I0e7a3ce47e0b6e3a7b15006a6d17d103d23e8064
* | | | | | Merge "Fix libart files to work with javadoc"Brian Carlstrom2014-06-182-2/+2
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Fix libart files to work with javadocBrian Carlstrom2014-06-182-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | Bug: 14298175 Change-Id: I3f36ca6259a28bf9beae02bf30ba365eb263e3c1
* | | | | Merge "Fix getISO3Country and getISO3Language."Narayan Kamath2014-06-174-17/+21
|\ \ \ \ \
| * | | | | Fix getISO3Country and getISO3Language.Narayan Kamath2014-06-184-17/+21
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For backward compatibility, locales constructed with 3 letter countries and languages must return those languages and countries from these methods. With our strict language tag interpretation, these were being omitted or transformed to und. We fix this by passing only the language code (or the country code with a fixed language) down to ICU, which will then deal with it correctly. bug: 15638049 Change-Id: I517a82496a2a4c36b1ae9234f7d2d4eb89b34ffe
* | | | | Merge "Relax KeyPairGeneratorTest"Neil Fuller2014-06-171-8/+43
|\ \ \ \ \
| * | | | | Relax KeyPairGeneratorTestNeil Fuller2014-06-181-8/+43
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing KeyPairGeneratorTest to handle different number of providers. Bug: 5513723 Change-Id: I74ba53d9ebe8197bf4aeeb8f5742b961d5285bfb
* | | | | Merge "Alter regression test for bug 71369 now the issue is understood"Neil Fuller2014-06-171-3/+10
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Alter regression test for bug 71369 now the issue is understoodNeil Fuller2014-06-181-3/+10
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was most likely fixed by an ICU update. This was added to prevent regression. See the bug for details. Bug: 71369 Change-Id: I8896334dfeac3a1dcb6379ac58510ede60f6b7c7
* | | | Merge "Add a test for bug 71369"Neil Fuller2014-06-171-0/+15
|\ \ \ \ | |/ / / |/| | |
| * | | Add a test for bug 71369Neil Fuller2014-06-171-0/+15
| |/ / | | | | | | | | | | | | | | | The bug appears not to be present any more. Change-Id: I83999e7ded4818048c386b41dd879d56edad18e7
* | | Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"Neil Fuller2014-06-101-340/+307
|\ \ \
| * | | Tidy up MulticastSocketTest and fix execution on hammerheadNeil Fuller2014-06-111-340/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the fixes for DatagramChannelMulticastTest in 6d7b081971d12b25426c46e4989e7df3a5995eae but for java.net.MulticastSocket. Because MulticastSocketTest was the genesis of DatagramChannelMulticastTest it had similar issues to that one, but also contained other unnecessary or badly formatted code. The main changes here are: 1) Fix the tests that were implicitly assuming that the IPv6NetworkInterface1 was the same interface as the IPv4 version (networkInterface1). 2) Renamed variables / moved setUp to the top of the class / closed sockets after use / fixed try/catch blocks to only wrap expected throwing code / pulled out common code into new methods and generally tidied up. 3) Removed the use of the "MulticastServer" class entirely. This "server" would listen to socket on a separate thread and was the source of multiple Thread.sleep(1000) calls in the test. The tests rely exclusively on multicast loopback mode anyway (MulticastSocket.setLoopbackMode()) and MulticastSocket.receive() is blocking, which means it either gets an immediate result or the test can rely on the setSoTimeout() method to limit the time spent waiting. The use of multiple threads was therefore unnecessary. Bug: 15509450 Change-Id: Ie448cc3b2d7432012957db34c72949a7b4da359f
* | | | Merge "Pass BCP-47 tags and not Locale.toString results to ICU."Narayan Kamath2014-06-1022-289/+511
|\ \ \ \
| * | | | Pass BCP-47 tags and not Locale.toString results to ICU.Elliott Hughes2014-06-1622-289/+511
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICU can't handle the new toString forms for scripts etc. and it's also guaranteed to deal with BCP-47 tags correctly. Most of the changes in this patch are required to keep backwards compatibility for getDisplayCountry string etc. in the face of the transformations toLanguageTag performs. A few tests were changed, but for the better. The tagalog -> filipino charlie foxtrot will be dealt with in a follow up change. Co-Authored-By: Narayan Kamath <narayan@google.com> Change-Id: Ia7f26d92a0e38c4bbb1d839c0fbd8ad16a473bf5
* | | | Merge "Fix bogus define checks and a typo."Narayan Kamath2014-06-102-10/+37
|\ \ \ \ | |/ / / |/| | |
| * | | Fix bogus define checks and a typo.Narayan Kamath2014-06-132-10/+37
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RT_* constants are enum members in the UAPI so we can't use #define checks for them. Also fix a typo in the define check for an IFA_ constant. More generally, we should get rid of all these conditional checks for target builds because we know what version of the UAPI we have in bionic. We should move these conditional checks under #if HOST_BUILD or something similar. bug: 15602893 Change-Id: I3affc10773ade4dac68c176f79962ca8ad312579
* | | Merge "Remove unnecessary loop in uloc_forLanguageTag."Narayan Kamath2014-06-101-15/+15
|\ \ \
| * | | Remove unnecessary loop in uloc_forLanguageTag.Narayan Kamath2014-06-121-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When uloc_forLanguageTag fails with a U_STRING_NOT_TERMINATED_WARNING or with a U_BUFFER_OVERFLOW_EXCEPTION, we know precisely how many characters we need to allocate to make the call succeed. Change-Id: Ie761b9c7279d3c6f6d432285155a7087fab6d066
* | | | Merge "Implement Locale.toLanguageTag without ICU support."Narayan Kamath2014-06-104-73/+256
|\ \ \ \ | |/ / /
| * | | Implement Locale.toLanguageTag without ICU support.Narayan Kamath2014-06-124-73/+256
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of an effort to avoid having to construct and parse ICU locale IDs and to instead use language tags as inputs to all ICU APIs. Only one minor unit test adjustment was required, and that change brings the test closer in line with the spec. Change-Id: I8abc0e3b868dd73e4fb9e36b6db19853eb99e6ac
* | | Merge "Extract non-API locale tests into a separate test class."Narayan Kamath2014-06-102-106/+129
|\ \ \
| * | | Extract non-API locale tests into a separate test class.Narayan Kamath2014-06-112-106/+129
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Several ICU tests and tests of ICU related internal methods have snuck into LocaleTest. Split them into a separate class to make it easier to run this test against older branches and across refactorings. Change-Id: I16db4a930b39e5dd4af16d99aa4ecd1be7cf948f
* | | Merge "Fix Mac build."Ian Rogers2014-06-102-1/+7
|\ \ \
| * | | Fix Mac build.Ian Rogers2014-06-102-1/+7
|/ / / | | | | | | | | | Change-Id: I32fdb9dabbc87d49e0be82ea39c2eea6f452fd6f
* | | Merge "Tests for Runtime.*Memory()"Neil Fuller2014-06-102-39/+23
|\ \ \
| * | | Tests for Runtime.*Memory()Neil Fuller2014-06-102-39/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs describe a condition we do not test for. The freeMemory / totalMemory tests have been consolidated into a single test and joined by an additional assertion for maxMemory(). The test for freeMemory from OldRuntimeTest has been tidied up and moved to RuntimeTest. Bug: 15507122 Change-Id: I4343215fb7f6b441613e25d3844d67812f5b5e94
* | | Merge "Fix DatagramMulticastChannelTest so it works better on hammerhead"Neil Fuller2014-06-101-345/+392
|\ \ \
| * | | Fix DatagramMulticastChannelTest so it works better on hammerheadNeil Fuller2014-06-101-345/+392
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some android devices have a WiFi-direct interface (p2p0) that probably shares underlying hardware with the standard wireless interface (wlan0). On hammerhead, when Wifi-direct is disconnected this interface appears to (only) have an IPv6 address and is "up" and "support multicast". The test was not tested on this hardware when it was written. Mako devices have the same behavior but the wlan0 interface most likely discovered first. The ordering of interfaces may also not be stable. The other breakages were due to implicit assumptions that the device supports both IPv4 and IPv6 on a single interface. The tests also rely on the IP_MULTICAST_LOOP option to receive packets sent out. There were some other bugs that were probably the result of assuming that when the interface was left unspecified the device would route outgoing packets via the interface the test was listening on. With multiple interfaces available those tests were flaky. Bug: 15509450 Change-Id: I33f71e26379a53334dce9991043c3a9a21000d02
* | | Merge "Build fix."Ian Rogers2014-06-102-1/+3
|\ \ \
| * | | Build fix.Ian Rogers2014-06-092-1/+3
|/ / / | | | | | | | | | Change-Id: I52559cfcc806dfe0d8682be50a6078cb678e4169
* | | Merge "Remove deprecated WITH_HOST_DALVIK."Ian Rogers2014-06-107-76/+133
|\ \ \ | |/ / |/| |
| * | Remove deprecated WITH_HOST_DALVIK.Ian Rogers2014-06-097-76/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 13751317 Fix the Mac host build: - conditionally define constants using pre-existing pattern, - make Posix calls that the Mac doesn't support throw UnsupportedOperationException. Change-Id: Ib68887cbe36ab167d042eb96c7834bce0651b078
* | | Merge "Shard the _getInstance test and skip the DH tests."Neil Fuller2014-06-092-55/+70
|\ \ \ | |/ / |/| |