summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Groundwork towards making the Libcore.os functionality public.Elliott Hughes2014-04-2471-279/+660
| | | | Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
* Merge "libcore changes to support asynchronous close interruption"Neil Fuller2014-04-2323-138/+844
|\
| * libcore changes to support asynchronous close interruptionNeil Fuller2014-04-2223-138/+844
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously AsynchronousSocketCloseMonitor was used to handle socket interruption on close. To support the same for FileChannel it has been renamed to AsynchronousCloseMonitor. The Java class was already called this. FileInputStream, FileOutputStream, RandomAccessFile will now throw IOException if a connection is closed by another thread during read. Thread.interrupt() continues to have no effect on streams. FileChannel will now throw AsynchronousCloseException during reads and writes if the file is closed, per the documentation. FileChannel will now throw ClosedByInterruptException during reads and writes if the thread reading/writing is interrupted. Note: FileChannel.lock() will probably still not not throw AsynchronousCloseException, though it probably should. This change also has impact on external/conscrypt and frameworks/base. Change-Id: I37de3e7d1a005a73821221e6156d10b95c595d7a Bug: 13927110
* | Merge "Removal of a broken CTS test"Neil Fuller2014-04-231-29/+0
|\ \
| * | Removal of a broken CTS testNeil Fuller2014-04-231-29/+0
| |/ | | | | | | | | | | | | | | | | | | | | The cause of the failure is that the test asserts that the entrySet() Set from an UnmodifiableMap is Serializable, when it is not. The test fails under the RI as well so I have removed it. Bug: 11668227 Change-Id: Ife3ce848f77d6f63931852792e0f6f0db83382a8
* | Merge "Fix for ThreadGroup CTS test."Neil Fuller2014-04-231-527/+212
|\ \
| * | Fix for ThreadGroup CTS test.Neil Fuller2014-04-231-527/+212
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the test for UncaughtExceptionHandler. This was actually several tests in one. Each has been broken out. The ones that were failing were a result of the CTS test runner executing as an instrumented Android app. The default behavior (configured in com.android.internal.os.RuntimeInit) is to kill an app if an uncaught exception reaches the top-most handler. The solution was to set an alternative default UncaughtExceptionHandler on Thread to suppress this behavior for the duration of the test by installing an alternative handler. This handler could also then be used to confirm the ThreadGroup behavior of "if an exception is handled by the ThreadGroup hierarchy, use the Thread default UncaughtExceptionHandler". The functionality changes are in: 1) setUp()/tearDown() - installing, uninstalling the handler and removing a Thread.sleep(50). 2) test_uncaughtException_* methods split out. Additional tests were added and one was removed. 3) Tidied up test_list(), which was relying on particular thread names and would have used Thread.stop() (which is unimplemented) if those threads were found. The remaining changes were refactorings to pull out common code, remove unneccessary newlines / comments / semi-colons, reformat to 100 chars width, remove == true / == false conditions, delete dead code. All pure functions have been made static to make it clearer they have no side-effects. What remains is still not nice, but is improved and ~300 lines shorter. Bug: 13748422 Change-Id: I995553a909974cb0bb6b9521a6a39fd0d6014a3f
* | Merge "Fix SSLEngineTest for RI"Kenny Root2014-04-222-8/+14
|\ \
| * | Fix SSLEngineTest for RIKenny Root2014-04-222-8/+14
|/ / | | | | | | | | | | | | | | The assymmetry between client and server with create sessions seems strange. It seems like a bug in the RI, so make sure Android does the right thing. Change-Id: I7b7ab501bd1963757b7f067c6ace8230a19a3e53
* | Merge "@hide Integer#parsePositiveInt(String)"Calin Juravle2014-04-221-0/+2
|\ \ | |/ |/|
| * @hide Integer#parsePositiveInt(String)Calin Juravle2014-04-221-0/+2
|/ | | | | Bug: 5239391 Change-Id: I01632d4846342293e881553feee3ae40f97e2443
* Merge "Disallow explicit signs in java.sql.Date#valueOf()"Calin Juravle2014-04-223-15/+70
|\
| * Disallow explicit signs in java.sql.Date#valueOf()Calin Juravle2014-04-223-15/+70
| | | | | | | | | | Bug: 5239391 Change-Id: I52bd621bd6ed46d1ae01abf1be25d1ac3c76d7e0
* | Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"Neil Fuller2014-04-225-36/+19
|\ \
| * | Change DecimalFormat.setRoundingMode() behavior to stay in specNeil Fuller2014-04-155-36/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serialization tests revealed that some DecimalFormat instances could not be round-tripped. The reason is that the setRoundingMode() method was setting a non-zero rounding increment, which cannot be persisted, and also creates patterns that are outside of the DecimalFormat spec. Addressed the fact that ICU4C appears to support RoundingMode.UNNECESSARY now by deleting special-case code. Changed SerializationStressTest to use canonical DecimalFormat patterns: The ones chosen had a couple things that were not ideal: 1) Putting '-' in quotes causes ICU (for non-obvious reasons) treat the negative pattern prefix as not being default. Default in this case means "the positive prefix with a preceding '-'. Removing the quotes meant it would recognize the pattern as not needing everything after ;., so the pattern would be shrunk. 2) The positive pattern was also not one ICU could deal with fully. ICU changed "#.#" to "#0.#" at parse time (which can be corrected with a setMinimumIntegerDigits(0)). It's not clear why ICU cannot deal with parsing "#.#" when it can produce it, but there is a long comment in decimfmt.cc suggesting it is intentional and to avoid format producing empty strings. The pattern has been changed to one that ICU can handle and would choose when the various serialized fields are read back. This is necessary because NativeDecimalFormat compares the patterns and not just the serialized fields. Leaving the pattern check part of equals() means that two non-spec patterns will not be considered equal(), which is important while Android allows non-spec patterns. Restricting support in DecimalFormat to the documented subset of characters is not worth the effort and may cause problems elsewhere. Change-Id: I2de588458b86619733c0dc1692d526f179059910 Bug: 11668227
* | | Merge "Fix build (javadoc @link tags)."Elliott Hughes2014-04-221-2/+2
|\ \ \
| * | | Fix build (javadoc @link tags).Elliott Hughes2014-04-211-2/+2
|/ / / | | | | | | | | | Change-Id: If0cb922427a826cad16c8be8a78cdfbccc218c32
* | | Merge "Allow empty rules in a RuleBasedCollator."Elliott Hughes2014-04-212-13/+4
|\ \ \
| * | | Allow empty rules in a RuleBasedCollator.Elliott Hughes2014-04-212-13/+4
|/ / / | | | | | | | | | | | | | | | | | | This is allowed by the CLDR specification, and we were already allowing most forms of empty rules, just not the zero-length string. Change-Id: I3c2a020aac23e54f8044defbfe2e2a5b600e454c
* | | Merge "Fix typo in Locale docs."Elliott Hughes2014-04-211-1/+1
|\ \ \
| * | | Fix typo in Locale docs.Elliott Hughes2014-04-211-1/+1
|/ / / | | | | | | | | | Change-Id: I1fd60e1b23ebf02a4a242d622312502b941ddd1e
* | | Merge "Track the icu4c 53 update in the Locale documentation."Elliott Hughes2014-04-211-4/+8
|\ \ \
| * | | Track the icu4c 53 update in the Locale documentation.Elliott Hughes2014-04-211-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add links to the icu4c release notes. These aren't particularly useful because they're a bit low-level for our audience, and we've often skipped multiple releases, but it can't really hurt. Change-Id: I5243b4a041470cec17ebf39a5da8ce6cbe270e86
* | | | Merge "Updated documentation for RuleBasedCollator."Elliott Hughes2014-04-211-249/+53
|\ \ \ \ | |/ / / |/| | |
| * | | Updated documentation for RuleBasedCollator.Elliott Hughes2014-04-211-249/+53
| | |/ | |/| | | | | | | | | | Change-Id: Ia927033773ea3ad6c417306cbbfffc4afe08fab5 Signed-off-by: Markus Scherer <mscherer@google.com>
* | | Merge "Update collation tests for icu4c 53."Elliott Hughes2014-04-217-100/+52
|\ \ \
| * | | Update collation tests for icu4c 53.ccornelius2014-04-217-100/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of ICU 53, rule strings must begin with a reset '&'. http://www.unicode.org/reports/tr35/tr35-35/tr35-collation.html#Rules Also, fewer collation elements exist in ICU 53 because ae-ligature maps to two rather than three logical collation elements. Now the last one yields only one CollationElementIterator value rather than two. Finally, it's no longer possible to switch from forward to backward iteration without calling reset/setOffset/setText. This used to be undefined behavior but is now checked. Change-Id: I663a2b229e551cd6f5753ddae0660f813dbbf866
* | | | Merge changes I7db8e513,I564283bbKenny Root2014-04-217-193/+213
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | * changes: Update SSLEngineTest for OpenSSL Update SSLEngineTest for RI
| * | | Update SSLEngineTest for OpenSSLKenny Root2014-04-104-103/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our new OpenSSL-based SSLEngine supports all the new stuff and no longer fails tests. Change-Id: I7db8e5134ca36ebd963c7081cd7ba79d91b3e5e2
| * | | Update SSLEngineTest for RIKenny Root2014-04-106-91/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RI now supports TLSv1.2 with SSLEngine, so update all the expectations for their tests. It also appears to disable "weak" algorithms when you select TLSv1.2. Change-Id: I564283bb4945d3b71bee0f89c93c6dd6e238b4f8
* | | | Merge "Remove include of private ICU include and set constant size for ↵Elliott Hughes2014-04-211-2/+2
|\ \ \ \ | |_|/ / |/| | | | | | | buffer in libcore_icu_NativeCollation.cpp"
| * | | Remove include of private ICU include and set constant size for buffer inccornelius2014-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | libcore_icu_NativeCollation.cpp Change-Id: I31ae75707b7036ab5b509c88915648fbaf7d76a5
* | | | Merge "Add parsePositiveInt for internal use."Calin Juravle2014-04-172-0/+44
|\ \ \ \
| * | | | Add parsePositiveInt for internal use.Calin Juravle2014-04-162-0/+44
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will help fix issues caused by allowing explicit '+' sign in numerical strings. Bug: 5239391 Change-Id: I95b4db1a06a35d5ef72b28c4764a0190f10c55c8
* | | | Merge "Fix broken CTS test"Neil Fuller2014-04-161-303/+207
|\ \ \ \ | |/ / / |/| | |
| * | | Fix broken CTS testNeil Fuller2014-04-161-303/+207
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is in test_isJavaIdentifierPartC() and reverses the assertion for Character.isJavaIdentifierPart('\u200b') from false to true. The test method below it (isIdentifierPart(int)) was already asserting this and the behavior has been confirmed against the RI. Other changes made: Uncommented some assertions that now pass, removed unnecessary / incorrect comments, added missing braces, some reformatting to 100 chars to improve readability, removed empty lines at the beginning of methods . Converted all assertTrue(msg, !condition); to assertFalse(msg, condition). Change-Id: I0a339df3cd594252a13083e4d4319260ce43fa5d Bug: 13748395
* | | Merge "Set ICU's default locale from Locale.getDefault."Narayan Kamath2014-04-124-0/+45
|\ \ \
| * | | Set ICU's default locale from Locale.getDefault.Narayan Kamath2014-04-114-0/+45
| | | | | | | | | | | | | | | | | | | | bug: 2541757 Change-Id: I5de58be7e8a701f2c40182ea54bceff85ec1aad2
* | | | Merge "Don't allow explicit signs in URL port numbers."Calin Juravle2014-04-112-4/+22
|\ \ \ \
| * | | | Don't allow explicit signs in URL port numbers.Calin Juravle2014-04-102-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5239391 Change-Id: Iea158e19de2ace224f29c07c56811b7eab9c0eb9
* | | | | Merge "Don't allow explicit signs in URI port numbers."Calin Juravle2014-04-112-4/+31
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | |
| * | | Don't allow explicit signs in URI port numbers.Calin Juravle2014-04-102-4/+31
|/ / / | | | | | | | | | | | | Bug: 5239391 Change-Id: I26fb1042d169d545a793e47596f4f8a94dd09530
* | | Merge "Fix Locale.getDisplayName."Narayan Kamath2014-04-102-3/+22
|\ \ \ | |/ / |/| |
| * | Fix Locale.getDisplayName.Narayan Kamath2014-04-092-3/+22
|/ / | | | | | | | | | | | | | | | | | | | | - Don't append the country instead of the script. - Ensure that there's a "," separating the country and the script. - Add missing tests for Locale#getDisplayName when scripts and variants are present. bug: 13790258 Change-Id: I7a3f3db73879755fa8159f94a378bc585c779cc2
* | Merge "Fix for ClassLoaderTest under CTS"Neil Fuller2014-04-075-65/+144
|\ \
| * | Fix for ClassLoaderTest under CTSNeil Fuller2014-04-075-65/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests could not work given the arrangement of classloaders in Android apps. This also fixes a known failure case in ClassLoaderTest which was due to missing resources. Also updated ClassTest. Change-Id: I114aa9b1a177911aed0aef87819d93a260f0b8d1 Bug: 12491655
* | | Merge "Fix broken CTS HttpCookie test"Neil Fuller2014-04-072-4/+22
|\ \ \ | |_|/ |/| |
| * | Fix broken CTS HttpCookie testNeil Fuller2014-04-072-4/+22
| |/ | | | | | | | | | | | | | | Added some test cases and corrected the test to conform to the RI behavior. Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760 Bug: 13748507
* | Merge "Fix Greek uppercasing."Elliott Hughes2014-04-043-20/+49
|\ \ | |/ |/|
| * Fix Greek uppercasing.Elliott Hughes2014-04-043-20/+49
|/ | | | | | | This matches Chrome's behavior. Bug: 13246961 Change-Id: I1954da3116a1759cb650bffed558dced5770e3ec