- 05 Oct, 2016 2 commits
-
-
gitbuildkicker authored
-
TreeHugger Robot authored
-
- 04 Oct, 2016 2 commits
-
-
Neil Fuller authored
Adds a test that proves the SHORT/MEDIUM time formats are not cached and the DateFormat.is24Hour setting is correctly honored. Bug: 31762542 Test: run cts -m CtsLibcoreTestCases -t libcore.java.text.DateFormatTest (cherry picked from commit 0c0bab19) Change-Id: I4a1db0b9bb6e13f553b7a272471c0e09b156a905
-
gitbuildkicker authored
-
- 03 Oct, 2016 1 commit
-
-
Neil Fuller authored
-
- 30 Sep, 2016 1 commit
-
-
Neil Fuller authored
This change removes pattern string caching from the SimpleDateFormat constructor only used by DateFormat.getInstance(). Before this change, the LocaleData.getTimeFormat(int) method that is used to populate the cached data can return different information for SHORT and MEDIUM times based on the DateFormat.is24Hour setting and so the results are not safe to cache: if the user modifies their "use 24-hour format" setting and the data is already cached the old pattern was persisted forever. This was also causing various CTS tests to fail if the device had the "use 24-hour format" setting on. For example: libcore.java.text.OldDateFormatTest org.apache.harmony.tests.java.text.MessageFormatTest org.apache.harmony.tests.java.util.DateTest Callers of java.text.DateFormat.get(int, int, int, Locale) are affected. In practice that means DateFormat.getTimeInstance() / getTimeInstance(int) and getTimeInstance(int, Locale). Indirect callers in the Android framework include: android.text.format.DateUtils android.text.format.DateFormat android.widget.DigitalClock java.text.MessageFormat This change has a small negative affect on performance, but not a significant one: obtaining a DateFormat via DateFormat.getTimeInstance() goes from ~28us to ~33us on an Angler device. Full results for the benchmarks included: Before: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=27518.68, 1st qu.=28461.12, median=28775.87, mean=28732.44, 3rd qu.=29235.59, max=29320.80 runtime(ns): min=28599.17, 1st qu.=28769.57, median=29277.13, mean=29682.69, 3rd qu.=29824.08, max=33419.06 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=108667.38, 1st qu.=110223.70, median=111547.98, mean=112173.89, 3rd qu.=113748.88, max=118091.12 runtime(ns): min=102995.66, 1st qu.=105045.16, median=108558.77, mean=108817.18, 3rd qu.=111677.65, max=115886.11 After: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=31365.39, 1st qu.=32904.01, median=33303.47, mean=33244.55, 3rd qu.=33983.32, max=34052.99 runtime(ns): min=31785.28, 1st qu.=32921.68, median=33364.01, mean=33531.03, 3rd qu.=34301.06, max=35031.33 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=126834.48, 1st qu.=128605.17, median=130069.44, mean=131157.63, 3rd qu.=134095.26, max=138164.92 runtime(ns): min=124618.08, 1st qu.=126097.91, median=130190.93, mean=130027.17, 3rd qu.=131991.56, max=140283.06 Bug: 31762542 Test: Ran CtsLibcoreTestCases with the "use 24-hour format" on and off Change-Id: I02798e8fcd2ed5f7625a32261112560b5d9b18f3
-
- 21 Sep, 2016 1 commit
-
-
gitbuildkicker authored
-
- 19 Sep, 2016 1 commit
-
-
Neil Fuller authored
Fix DatagramSocket.disconnect() in the case where an exception has been thrown during connect(). commit 6764aa32 introduced a bug because it would leave connectState as ST_CONNECTED when connect() failed. The correct state in this case appears to be ST_CONNECTED_NO_IMPL instead (which is then dealt with correctly by disconnect()). This change rearranges the Android changes over upstream to make it closer to upstream and try to make it clearer what state is guaranteed after an exception is thrown. Test: Ran CtsLibcoreTestCases Bug: 31218085 (cherry picked from commit 979fbd7f) Change-Id: I8b8e595a8c160b9dbc3450ae20da1be5fb91f47c
-
- 18 Sep, 2016 1 commit
-
-
gitbuildkicker authored
-
- 16 Sep, 2016 2 commits
-
-
TreeHugger Robot authored
-
Yi Kong authored
This is due to code after getImpl().connect(address, port); is not executed if it throws exception, leaving DatagramPacket in an inconsistant state. Re-arrange the order of code so that the state is now consistent. Bug: 31218085 Bug: 31495962 (cherry-picked from commit 6764aa32) Test: libcore.java.net.DatagramSocketTest Change-Id: Iab9bfd9af211666564e49de62fdae964d6330daf
-
- 15 Sep, 2016 12 commits
-
-
Alex Klyubin authored
Assert that DESede/CBC/PKCS5Padding Cipher works as expected am: 44042892 am: 75b8cbea am: 98c5c06c am: a774f68e -s ours Change-Id: I7f78c1553f22723fff58ca3577abf65e6da910f7
-
Alex Klyubin authored
am: 98c5c06c Change-Id: I7fb5f18d8f4e77bbc455a27b132e4d294900cf6d
-
Alex Klyubin authored
am: 75b8cbea Change-Id: I3e982fe3fe4b405edd895909c8c9f574edeaf441
-
Alex Klyubin authored
am: 8894af2b Change-Id: I1e537190953fc402dffdd9d27ffc73999f75c287
-
Alex Klyubin authored
am: 27aea9ef Change-Id: I2f8f7fcbb6b14785f134a845b17ed099fa9d281c
-
Alex Klyubin authored
am: 44042892 Change-Id: I5d47561fbba684c7798c769d018624fd9a704643
-
Joachim Sauer authored
-
Yi Kong authored
-
Joachim Sauer authored
Change Id31e23928b8a21f0d5b54c180a48de0ff3bdae75 in external/icu patched in a subset of Unicode 9 data (specifically bidi changes) to fix a user-visible issue with new Emojis breaking the RTL flow if used in RTL languages. See the commit log of that change for more details. This regression test verifies that affected characters are treated as LTR neutral (i.e. they "inherit" the direction of the surrounding text) and will only pass when the change mentioned above is applied as well (or a more recent ICU version with the full Unicode 9 data set is used). Bug: 30652865 Test: ran libcore.java.text.OldBidiTest Change-Id: I9a589f4cd5f23068517a0c3df4b6a688ae4e1b82
-
Yi Kong authored
Libcore commit 9b7cfceb stubbed PrivilegedActionException and getException() is changed to return null. However there are usages of this by libcore, eg. SocketAdaptor#getOutputStream. This reverts the code back to upstream (8u60) version. This is backported from master, with changes to use JUnit3 instead. Bug: 31360928 Test: libcore.java.security.PrivilegedActionExceptionTest Change-Id: I57a1f0306087ab5bd4611213ba1c0b84086b28dd (cherry picked from commit 0eb2ef8e)
- 14 Sep, 2016 2 commits
-
-
Alex Klyubin authored
(cherry picked from commit c3f66fe5) Bug: 31081987 Change-Id: I1a31903e884835b86fccbecfcbd33af683312d0d
-
Alex Klyubin authored
(cherry picked from commit c3f66fe5) Bug: 31081987 Change-Id: I1a31903e884835b86fccbecfcbd33af683312d0d
-
- 13 Sep, 2016 14 commits
-
-
Narayan Kamath authored
am: f912d9fa Change-Id: Iea5586805885e83e373ef6ab06c74ca411de81f4
-
Narayan Kamath authored
am: f5f96739 Change-Id: I614b910de351af02611d1ab8d7d789a54d3f70df
-
Narayan Kamath authored
am: ca169e48 Change-Id: I9f5620ec87c7c11489eeb2460904079156926046
-
Narayan Kamath authored
am: 42808ca7 Change-Id: If4c50e8d2bf5b2cdf49278ed906c2e9fe84b48d7
-
Narayan Kamath authored
Change-Id: I8088de3b800f7e817003ab1ca604c6f2908c4f4f
-
Narayan Kamath authored
am: 1ea83ffd Change-Id: If1509999e61a2355ae0b005097ebe45df8e0c4ce
-
Narayan Kamath authored
am: 9a0a2790 Change-Id: I3dad767bf9306b31c2e0bd39ed7c99a41b8cbd0c
-
Narayan Kamath authored
am: 2395ad00 Change-Id: I64b5efa60d5b4cc965daa97904e389f1e0dd98b0
-
Narayan Kamath authored
am: 5344ac8f Change-Id: Ieb1915143dcfcff6a71b32a4e580443bf412ab6a
-
Narayan Kamath authored
am: fffeb3bd Change-Id: Ie9dbe28cb59b3b058e012971e827da7be9103625
-
gitbuildkicker authored
- 12 Sep, 2016 1 commit
-
-
Tobias Thierer authored
-