summaryrefslogtreecommitdiffstats
path: root/luni
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Changes to enable timezone data overrides for ICU and libcore"Neil Fuller2015-04-072-19/+64
|\
| * Changes to enable timezone data overrides for ICU and libcoreNeil Fuller2015-03-262-19/+64
| | | | | | | | | | Bug: 19941636 Change-Id: Id587be99f645978c2e1067c9f8eef26d6d63ec27
* | GZIPInputStream: Correctly handle extras in gzip headers.Narayan Kamath2015-04-072-1/+17
| | | | | | | | | | | | | | We were peeking into the wrong field for the extra length. bug: https://code.google.com/p/android/issues/detail?id=159340 Change-Id: Ib7ed400e3e119b1d6c95be49d25812c5c7f366b9
* | Merge "Expose getSpi from crypto operations as hidden API."Alex Klyubin2015-04-034-4/+22
|\ \
| * | Expose getSpi from crypto operations as hidden API.Alex Klyubin2015-03-244-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible for platform code to obtain the current SPI implementation of Cipher, Signature, Mac, and KeyAgreement instances. The current use case is to access additional information about these crypto operations when they are backed by Android KeyStore. NOTE: The getSpi API will not and cannot become public framework API. Bug: 18088752 Change-Id: If575726d288eebc73ffa3209c316fad071a087fd
* | | GZIPInputStream: Fix handling of header CRCs.Narayan Kamath2015-04-032-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same mistake as public bug 159340, we were peeking in the wrong buffer for the CRC. Note that this is different from the member CRC, the latter is the CRC of the actual data (not the header) and is mandatory. Change-Id: I98d49bdd9d5ea93fe982783c8077531764ee5347
* | | Don't use zip64 by default.Narayan Kamath2015-04-036-579/+669
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was breaking tools like dexmaker that would write zipfiles to disk so that the runtime could read them. We don't want to go back and amend the local file header, so we just throw an IOException if somebody writes more than 4GB of data to an entry that doesn't have a declared size. If the entry has a declared size > 4GB, we can write the zip64 header in advance. bug: 19574093 Change-Id: I771e821996efd3ef4c3de5e02f5a0062e62f9244
* | | Merge "Be consistent with the library path."Nicolas Geoffray2015-04-031-1/+5
|\ \ \
| * | | Be consistent with the library path.Nicolas Geoffray2015-04-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the boot class loader (loader == null) loadLibrary tries to find the the full path of the library using java.library.path. When actually loading the library, we need to use the same java.library.path property in case the library has dependencies. Change-Id: I2404d72f5c65c6a5ecfedc1efe879cfc9cef55ad
* | | | Implement BreakIterator in terms of icu4j.Narayan Kamath2015-04-026-450/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that we need manual range checks in our wrapper because the ICU4J implementation will clamp offsets to either end of the input text. benchmark results : text benchmark us linear runtime LIPSUM BreakIterator 326.02 ===== LIPSUM IcuBreakIterator 333.47 ====== LONGPARA BreakIterator 227.67 ==== LONGPARA IcuBreakIterator 228.68 ==== GERMAN BreakIterator 79.09 = GERMAN IcuBreakIterator 81.30 = THAI BreakIterator 1654.11 ============================== THAI IcuBreakIterator 1646.75 ============================= THAI2 BreakIterator 44.28 = THAI2 IcuBreakIterator 42.67 = TABS BreakIterator 12.79 = TABS IcuBreakIterator 12.53 = ACCENT BreakIterator 16.26 = ACCENT IcuBreakIterator 15.37 = EMOJI BreakIterator 17.71 = EMOJI IcuBreakIterator 18.34 = SPACES BreakIterator 16.86 = SPACES IcuBreakIterator 15.78 = EMPTY BreakIterator 9.22 = EMPTY IcuBreakIterator 9.96 = NEWLINE BreakIterator 11.08 = NEWLINE IcuBreakIterator 9.96 = BIDI BreakIterator 19.54 = BIDI IcuBreakIterator 18.96 = Change-Id: I72023dd605da8e33974aa3181506f0d9c7bc180e
* | | | Merge "Override ICU4Js search path for ICU4C data."Narayan Kamath2015-04-021-0/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Override ICU4Js search path for ICU4C data.Narayan Kamath2015-04-011-0/+6
| | | | | | | | | | | | | | | | Change-Id: I4dc6c40be400e298921c57f5c6d6c413edd70f68
* | | | Fix KeyGeneratorTest breakage due to AndroidKeyStore.Alex Klyubin2015-04-012-1/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AndroidKeyStore provider's KeyPairGenerator and KeyGenerator instances require AndroidKeyStore-specific initialization parameters which are represnted by Android framework classes and are thus not accessible from libcore tests. This CL fixes KeyGeneratorTest to skip AndroidKeyStore provider to follow the behavior of KeyPairGeneratorTest. Change-Id: I61d176a7bc22a676d06d32f49aba37aebebe9c76
* | | Merge "Add a test to confirm that TZ data is in sync"Neil Fuller2015-03-303-0/+22
|\ \ \
| * | | Add a test to confirm that TZ data is in syncNeil Fuller2015-03-273-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android has two sources of timezone data: one used by bionic / libcore code, and one used by ICU. When ICU4J is added more tests can be added to confirm that ICU4C and ICU4J agree on time zone and other sources of data like CLDR and the ICU version itself. Bug: 19941636 Change-Id: I614392a876e19a55e362489f142eec71beaf5547
* | | | Merge "Test NetworkSecurityPolicy effect on HTTP connections."Alex Klyubin2015-03-261-0/+54
|\ \ \ \
| * | | | Test NetworkSecurityPolicy effect on HTTP connections.Alex Klyubin2015-03-251-0/+54
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds CTS tests that assert that platform-provided URLConnection instances that use cleartext HTTP honor the cleartext traffic policy from NetworkSecurityPolicy. Bug: 19215516 Change-Id: I79f5fce5e00434e96f4325c1aae65a573f10dcdd
* | | | Merge "Remove a misleading comment."Neil Fuller2015-03-261-3/+0
|\ \ \ \ | |/ / / |/| | |
| * | | Remove a misleading comment.Neil Fuller2015-03-131-3/+0
| | | | | | | | | | | | | | | | Change-Id: I7a5c8095e98f1449fb4efc98061c488fd0b573e2
* | | | Merge "Add libcore.net.NetworkSecurityPolicy."Alex Klyubin2015-03-254-2/+340
|\ \ \ \
| * | | | Add libcore.net.NetworkSecurityPolicy.Alex Klyubin2015-03-244-2/+340
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hidden libcore API is to be used by bundled network stacks to determine whether cleartext network traffic is permitted. These stacks cannot directly use the public Android framework API android.security.NetworkSecurityPolicy because the framework package typically compile-time depends on the packages offering these bundled network stacks. As an example, this CL makes java.util.logging.SocketHandler and platform-provided URLConnection instances for the FTP protocol honor this new flag. To avoid duplication, the intention is that framework's android.security.NetworkSecurityPolicy implementaion will switch to this new libcore API to store/retrive the state of framework's NetworkSecurityPolicy class. Bug: 19215516 Change-Id: I78e348458975d69c52918582a43db25df87e2a15
* | | | Merge "Fix for ftp:// invalid urls with ProxySelector"Neil Fuller2015-03-251-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Fix for ftp:// invalid urls with ProxySelectorNeil Fuller2015-03-251-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are currently no tests for FtpURLConnection. Future commits are planned that add tests that are based on the MockFTPServer open-source project. Thanks to pk.samson@ for the report. Bug: https://code.google.com/p/android/issues/detail?id=160725 Change-Id: I54fc2d5825f4e1b9681d537dd2c92b90659be5b5
* | | Merge "Remove forced alignment code."Christopher Ferris2015-03-243-84/+260
|\ \ \
| * | | Remove forced alignment code.Christopher Ferris2015-03-233-84/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The move from to gcc 4.8 to gcc 4.9 for arm32 introduced a bug in this code. The original code is trying to out smart the compiler by arch, but we got caught. Running benchmarks, the amount of time we save by doing this is in the nanosecond range, so just let the compiler figure things out on it's own. It turns out for aarch64, x86, x86_64, two of the functions produce exactly the same code. For swapLongs, x86/x86_64 produces slightly different code but is about the same performance. For arm32, letting the compiler optimize also leads to about the same performance. Adding unit tests and benchmark code for these. Bug: 19692084 Change-Id: I858eb3147ef1e9e2c1894ddb226cdddcc0baf933
* | | | Merge "Fix the year display when formatting absolute date string"Tao Bao2015-03-232-5/+79
|\ \ \ \
| * | | | Fix the year display when formatting absolute date stringTao Bao2015-03-232-5/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In getRelativeDateTimeString(), when formatting the absolute date string with formatDateRange(), we need to explicitly specify the option to show / hide the year display based on the given arguments. Otherwise it would determine based on the current time and may gave wrong results. In getRelativeTimeSpanString(), it follows the same logic when user doesn't supply any option. Bug: 19822016 Change-Id: I0d4f01b7d15e0b8ea44f21b77309b1fc370b365b
* | | | | Merge "Pass getDexPath to Runtime.nativeLoad"Dmitriy Ivanov2015-03-231-9/+10
|\ \ \ \ \
| * | | | | Pass getDexPath to Runtime.nativeLoadDmitriy Ivanov2015-03-201-9/+10
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getDexPath is used by Runtime.nativeLoad to open libraries directly from apk. Given that libraries are not compressed and are page-aligned. Bug: 8076853 Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
* | | | | Use compiler pragmas instead of flags.Narayan Kamath2015-03-232-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us turn off warnings for a small segment of the code instead of the entire project. bug: 19823499 Change-Id: I9309e9a33bddc33e8c100a49416e95b2a56e2385
* | | | | ICU55: Update locale data dependent test expectations.Fredrik Roubert2015-03-202-33/+33
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | ICU55 includes CLDR27 which has updated data for a number of locales, which affects libcore tests. Change-Id: I47c508a74945310dd7ad7abbb1dab1b77186a4e1
* | | | Merge "Set -Wno-deprecated-declarations to access deprecated IDNA2003 API."Narayan Kamath2015-03-191-0/+3
|\ \ \ \
| * | | | Set -Wno-deprecated-declarations to access deprecated IDNA2003 API.Fredrik Roubert2015-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In libcore_icu_NativeIDN.cpp there are calls to the deprecated IDNA2003 API which means that this code as of ICU55 no longer will compile without specifying the -Wno-deprecated-declarations compiler flag. bug: 19823499 Change-Id: Id5cd5da0d6c3ce62a5c642c99364d29eaebe7709
* | | | | Merge "Fix an ntohs/htons issue."Lorenzo Colitti2015-03-191-1/+1
|\ \ \ \ \
| * | | | | Fix an ntohs/htons issue.Lorenzo Colitti2015-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting between sockaddr_ll and PacketSocketAddress, we use ntohs in both directions. Converting from sockaddr_ll to PacketSocketAddress should use ntohs instead. This doesn't actually affect anything, because ntohs and htons identical, but it is conceptually wrong. Change-Id: Idd3cfcc11c4d6b7fed0c4b75a7935547f67eda12
* | | | | | Merge "Remove a superfluous cast."Lorenzo Colitti2015-03-191-2/+2
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Remove a superfluous cast.Lorenzo Colitti2015-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I1b4b9d9160a66d0ce9aa2449526041d1c75d545d
* | | | | Specify the base timestamp in RelativeTimeSpanString testsTao Bao2015-03-181-40/+38
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to specify the timezone and the base time explicitly in RelativeTimeSpanString tests. Otherwise if using (base = System.currentTimeMillis()) with default timezone, it may not give a correct answer of "tomorrow" by adding 24 hours to base when it's around DST transitions. Bug: 19744876 Change-Id: I8fed9086ec8ebea6d837763fe7bc034fbd8e4181
* | | | Remove executable permissions from java_lang_StringToReal.cppNarayan Kamath2015-03-171-0/+0
| | | | | | | | | | | | | | | | Change-Id: I0e36d41a822db1b9607543a9033f190eed5363c8
* | | | Add unit test for Timestamp#equals.Narayan Kamath2015-03-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | bug: 19756610 Change-Id: I2654643fefcb0402e34ff409c0cad1e1355cadc3
* | | | Merge "Libcore: Avoid double-checked locking"Andreas Gampe2015-03-163-70/+68
|\ \ \ \
| * | | | Libcore: Avoid double-checked lockingAndreas Gampe2015-03-153-70/+68
| | | | | | | | | | | | | | | | | | | | Change-Id: I77605ad05ac5e9dfac07f40a2280221f9c641c65
* | | | | Merge "Late binding: specified Provider forces its use"Kenny Root2015-03-1610-5/+220
|\ \ \ \ \
| * | | | | Late binding: specified Provider forces its useKenny Root2015-03-1610-5/+220
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Provider is specified in a call to Signature#getInstance, Cipher#getInstance, KeyAgreement#getInstance, or Mac#getInstance, it should return that provider no matter if the properties on that provider say it should support it. Bug: 19730263 Change-Id: I56045e4cb470a0e1aa0e108a443e04043467c475
* | | | | Merge "Libcore: Fix superfluous ternary in BufferedInputStream"Andreas Gampe2015-03-161-1/+1
|\ \ \ \ \
| * | | | | Libcore: Fix superfluous ternary in BufferedInputStreamAndreas Gampe2015-03-151-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | At the position, result is already checked to be positive. Change-Id: I3847022820294f76b944ce49d9ef8e8629ddb350
* | | | | Merge "Libcore: Fix infinite loop"Andreas Gampe2015-03-161-1/+1
|\ \ \ \ \
| * | | | | Libcore: Fix infinite loopAndreas Gampe2015-03-151-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Correctly dispatch to wrapped object. Change-Id: Ia2789f92ddeb61f6b74789220f9a50dfdcf4fd3b
* | | | | Expose the SocketAddress variant to bundled apps.Lorenzo Colitti2015-03-161-0/+5
| |_|/ / |/| | | | | | | | | | | Change-Id: I6b7985f23c1063c0cf68a12bf510da032bbd3e94
* | | | Merge "Also support IPv4 fallback in the SocketAddress version of sendto."Lorenzo Colitti2015-03-162-11/+34
|\ \ \ \