summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add VMRuntime.clampGrowthLimit"Mathieu Chartier2015-01-091-0/+6
|\
| * Add VMRuntime.clampGrowthLimitMathieu Chartier2015-01-081-0/+6
| | | | | | | | | | | | | | | | | | Used to release virtual memory for apps with small heaps according to manifest. Bug: 18387825 Bug: 17131630 Change-Id: I73cf18c80e7ce76bd627e5a9439dec4277c6af2d
* | Merge "Fix and clean up FileDescriptor.isSocket."Elliott Hughes2015-01-082-7/+22
|\ \
| * | Fix and clean up FileDescriptor.isSocket.Elliott Hughes2015-01-082-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original logic was accidentally inverted. This prevented sockets from being untagged, which would result in cancelled requests stalling out with sub-optimal TCP ZeroWindow detection instead of sending RST packets. Add a comment explaining how this works. Switch from SO_ERROR (which has a side-effect) to SO_DEBUG (which doesn't). Add a unit test. Bug: 18706592 Change-Id: Ib822a9727668908e04f87a6deb104dcebf333f05
* | | Merge "SSLSocketTest: test close alert during handshake"Kenny Root2015-01-081-0/+148
|\ \ \ | |/ / |/| |
| * | SSLSocketTest: test close alert during handshakeKenny Root2015-01-081-0/+148
|/ / | | | | | | | | | | | | | | If a client/server gets a close alert during a handshake, it should give a sane error message instead of something that is confusing to the developer. Bug: 18758595 Change-Id: I5d8d7dcb74fed4ff0ab943b5dc666819ec076e31
* | Merge "Add a test for bug 18644314."Narayan Kamath2015-01-081-9/+48
|\ \
| * | Add a test for bug 18644314.Narayan Kamath2015-01-081-9/+48
| | | | | | | | | | | | | | | bug: 18644314 Change-Id: I7eaf8f636c22e6c429af0686e3445eae3cd00d96
* | | Merge "SSLEngineTest: position should be same as produced/consumed"Kenny Root2015-01-081-3/+11
|\ \ \
| * | | SSLEngineTest: position should be same as produced/consumedKenny Root2015-01-071-3/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | The position of the buffer should match the number of bytes produced or consumed. Make sure all the tests have this condition on the handshake. Bug: 18921387 Change-Id: I8d248b2ac189d801586510fb5aca2e3bd6701ffe
* | | Merge "Fix a javadoc typo in java.net.URL.equals."Elliott Hughes2015-01-071-1/+1
|\ \ \
| * | | Fix a javadoc typo in java.net.URL.equals.Elliott Hughes2015-01-061-1/+1
| | |/ | |/| | | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=92930 Change-Id: Id3bc22d16cf4f493e937ebc76ebacd6a01b6f454
* | | Merge "Make some hidden methods final and more obviously private"Neil Fuller2015-01-072-7/+7
|\ \ \ | |/ / |/| |
| * | Make some hidden methods final and more obviously privateNeil Fuller2015-01-072-7/+7
| |/ | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=93714 Change-Id: I986c6af2bf8c54de06c95b2fd0d53709a7c9d573
* | Merge "Avoid a type conversion during comparison"Neil Fuller2015-01-061-1/+1
|\ \ | |/ |/|
| * Avoid a type conversion during comparisonNeil Fuller2015-01-061-1/+1
|/ | | | | | | Tiny change after commit 2237a9d0ea59928f8852c9f599bdd9a6930e727d to compare a long with a long. Change-Id: Iaba2d7246295f3f23c760fe72195136208a95933
* Merge "Fix Harmony's HostnameVerifierTest breakage."Alex Klyubin2015-01-051-3/+3
|\
| * Fix Harmony's HostnameVerifierTest breakage.Alex Klyubin2015-01-051-3/+3
| | | | | | | | | | | | | | | | | | | | These tests got broken by recent changes to the platform-default HostnameVerifier which no longer matches *.domain.com to domain.com. This CL fixes the affected tests by changing their expectaions. Bug: 18869757 Change-Id: I293b5f97f603a26a13cfd272a6175ef217ed4de3
* | Merge "Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>)."Narayan Kamath2015-01-022-14/+47
|\ \
| * | Extend ArrayList fastpath to Collections.sort(List<T>, Comparator<T>).Narayan Kamath2015-01-022-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My original reasons for not extending it were bogus. We can safely cast Object[] to T[] in this case. Also tidy up the benchmark by changing buildList(.. boolean isArrayList) to buildList(.. Class<T extends List<Integer> list. AFTER SortWithComparator_arrayList, arrayListLength=4} 10881.97 ns; σ=64.97 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=16} 33235.73 ns; σ=127.45 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=64} 130317.52 ns; σ=135.31 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=256} 495200.19 ns; σ=1120.86 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=1024} 1990796.02 ns; σ=19151.58 ns @ 6 trials BEFORE SortWithComparator_arrayList, arrayListLength=4} 40030.32 ns; σ=509.60 ns @ 10 trials SortWithComparator_arrayList, arrayListLength=16} 122122.08 ns; σ=182.58 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=64} 457833.87 ns; σ=1311.54 ns @ 3 trials SortWithComparator_arrayList, arrayListLength=256} 1764647.22 ns; σ=35150.74 ns @ 10 trials SortWithComparator_arrayList, arrayListLength=1024} 7127679.90 ns; σ=122546.75 ns @ 10 trials bug: 18821961 Change-Id: I22a18d99598dfacbdc54cf75e38dbc32ab027754
* | | Merge "Fix documentation for Calendar#clone."Narayan Kamath2015-01-022-1/+75
|\ \ \ | |/ / |/| |
| * | Fix documentation for Calendar#clone.Narayan Kamath2014-12-312-1/+75
|/ / | | | | | | | | | | | | | | | | Also add a test to make the behaviour of clone explicit. This should all be very obvious but it's probably best to make it clear. bug: https://code.google.com/p/android/issues/detail?id=3370 Change-Id: Ib17dccbf016a1dce4e21da089fd3597d6bfabe79
* | Merge "Fix CharsetEncoder.canEncode for empty CharSequences"Narayan Kamath2014-12-311-0/+4
|\ \
| * | Fix CharsetEncoder.canEncode for empty CharSequencesNarayan Kamath2014-12-311-0/+4
|/ / | | | | | | | | | | | | | | | | Broken by change c0c629a1 in which we started checking whether the encoded buffer was non-empty. Fixes org.apache.harmony.tests.java.nio.charset.ASCIICharsetEncoderTest#testCanEncodeCharSequence Change-Id: I9078f7f00a0f962e4f7eb113bdfa1445794d89b8
* | Merge "Add a zero-copy path for Collections.sort() on ArrayList."Narayan Kamath2014-12-303-7/+91
|\ \
| * | Add a zero-copy path for Collections.sort() on ArrayList.Narayan Kamath2014-12-303-7/+91
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that ArrayLists are array backed, we can sort the underlying array in place. A similar optimisation can be applied to Vector and CopyOnWriteArrayList but vector isn't used often enough to slow everything else down with an instanceof check and nobody should be daft enough to try sorting a CopyOnWriteArrayList. Note that it's possible to apply the same optimisation to Collections.sort(List<T>, Comparator<? super T>) but it involves a larger refactoring to allow us to use Object[] instead of T[] and is accompanied by a general loss of readability. ArrayList performance improves for all array sizes : BEFORE Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=4} 39021.26 ns; σ=206.27 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=16} 120903.59 ns; σ=1188.88 ns @ 5 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=64} 435484.98 ns; σ=19141.88 ns @ 10 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=256} 1772876.81 ns; σ=5542.74 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=1024} 7289431.83 ns; σ=110869.13 ns @ 10 trials AFTER Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=4} 9161.79 ns; σ=90.04 ns @ 6 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=16} 29988.90 ns; σ=74.05 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=64} 118142.86 ns; σ=1133.52 ns @ 7 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=256} 456091.11 ns; σ=9110.18 ns @ 10 trials Scenario{vm=app_process, trial=0, benchmark=Sort_arrayList, arrayListLength=1024} 1851939.39 ns; σ=69542.41 ns @ 10 trials For all other lists, there's no measurable difference for most sizes. length == 4 is harder to be sure about, given the large standard deviations and we'd expect the time spent in instanceof to be larger relative to the rest of what's going on. BEFORE Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=4} 49002.02 ns; σ=1392.58 ns @ 10 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=16} 154967.88 ns; σ=332.29 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=64} 588207.14 ns; σ=1863.60 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=256} 2292967.79 ns; σ=4578.14 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=1024} 9299582.60 ns; σ=179459.24 ns @ 10 trials AFTER Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=4} 49324.98 ns; σ=240.86 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=16} 155639.91 ns; σ=215.12 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=64} 581950.81 ns; σ=938.11 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=256} 2285933.64 ns; σ=13265.42 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=Sort_vector, arrayListLength=1024} 8981475.84 ns; σ=431676.48 ns @ 10 trials bug: 18821961 Change-Id: I30a3eaf89ff478663f555c93556167107da10873
* | Merge "Fix integer overflow issue in ZoneInfo."Narayan Kamath2014-12-302-9/+34
|\ \
| * | Fix integer overflow issue in ZoneInfo.Narayan Kamath2014-12-302-9/+34
|/ / | | | | | | | | | | | | | | | | | | | | The least messy fix is to change mTransitions to long[] despite the underlying tzdata being ints. This leads to neater code than comparing the unix time (as a long) against the first and last element of the transitions array. bug: 18839557 Change-Id: Ife562749e8b2160f664d566a0a2aae14a0aea36e
* | Merge "MimeUtils: add ODF presentation (template)"Elliott Hughes2014-12-271-0/+2
|\ \
| * | MimeUtils: add ODF presentation (template)Miklos Vajna2014-12-271-0/+2
|/ / | | | | | | | | | | | | | | If ODF text, spreadsheet and graphics is there, then leaving out presentation makes little sense. Change-Id: Ice81f480a751537d757a33bae4de94c0b6097daf Signed-off-by: Miklos Vajna <vmiklos@vmiklos.hu>
* | Merge "Fix thread correctness issue in OldAndroidMonitorTest."Narayan Kamath2014-12-241-7/+7
|\ \
| * | Fix thread correctness issue in OldAndroidMonitorTest.Junjie Hu2014-12-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The waiter thread was looping on a non-volatile variable and therefore not guaranteed to observe any reads or writes to that variable. Signed-off-by: Junjie Hu <junjie.hu@mediatek.com> Change-Id: I6e52e456636774c492690179b9d84a250aec2637
* | | Merge "Create GregorianCalendar via a delegate."Narayan Kamath2014-12-241-1/+7
|\ \ \ | |/ / |/| |
| * | Create GregorianCalendar via a delegate.Deepanshu Gupta2014-12-241-1/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | GregorianCalendar has a minimum-cost constructor that is not available on the host. This change wraps the call to that constructor in a static method that LayoutLib can replace. Bug: http://b.android.com/79160 (cherry picked from commit 8edeef21e47c2fd104fc6e1c8b26fc913945e0b9) Change-Id: I6cfdf2e4401dfb02efca3a41d61cd474b58da850
* | Merge "Move heap trimming daemon and GC deamon into a single daemon"Mathieu Chartier2014-12-202-33/+27
|\ \
| * | Move heap trimming daemon and GC deamon into a single daemonMathieu Chartier2014-12-192-33/+27
| |/ | | | | | | | | Bug: 18739541 Change-Id: Icf309cd8981372f24caa7c8b98a2e0591b1d90ea
* | Merge "Add various system calls needed by the zygote."Elliott Hughes2014-12-185-0/+52
|\ \
| * | Add various system calls needed by the zygote.Elliott Hughes2014-12-175-0/+52
| | | | | | | | | | | | | | | Bug: 18719692 Change-Id: I91a943369bc3b331e7e06e758f729b008c3c041c
* | | Merge "Add hwp to MimeUtils map."Elliott Hughes2014-12-181-0/+1
|\ \ \ | |/ / |/| |
| * | Add hwp to MimeUtils map.Sungmin Choi2014-12-171-0/+1
|/ / | | | | | | | | Bug: 18788282 Change-Id: I9e28278eae3812387440dbfce196a20c32e24b30
* | Merge "Don't TEMP_FAILURE_RETRY calls that can't fail."Elliott Hughes2014-12-171-4/+4
|\ \
| * | Don't TEMP_FAILURE_RETRY calls that can't fail.Elliott Hughes2014-12-171-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that while GCC doesn't care, clang is unhappy with us because it notices that we're comparing an unsigned value (like a uid_t) against -1: libcore/luni/src/main/native/libcore_io_Posix.cpp:727:12: error: comparison of integers of different signs: 'typeof (getegid())' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare] return TEMP_FAILURE_RETRY(getegid()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bug: 18759467 Change-Id: If71b11cbdd0cda2b8efcc1706eb49856c3770bb8
* | Merge "Don't try to build the libcore native code on the Mac."Elliott Hughes2014-12-171-0/+4
|\ \
| * | Don't try to build the libcore native code on the Mac.Elliott Hughes2014-12-171-0/+4
|/ / | | | | | | Change-Id: I79c5389af44ff2aea784d4f57c82d6aebf560132
* | Merge "Fix poll to never return EINTR."Elliott Hughes2014-12-175-44/+56
|\ \ | |/ |/|
| * Fix poll to never return EINTR.Elliott Hughes2014-12-175-44/+56
| | | | | | | | | | Bug: 18759467 Change-Id: Ia5b97a55318b5990ad6b80d15641223aa4fb06f5
* | Merge "Add a hidden API for detecting response charsets."Narayan Kamath2014-12-162-0/+142
|\ \
| * | Add a hidden API for detecting response charsets.Narayan Kamath2014-12-162-0/+142
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This is meant to be a partial replacement for apache's EntityUtils.toString for internal callers. Providing a stand in replacement seems like a bad idea because that API tries to coerce all responses into strings, even those that are binary. I'm torn about EntityUtils. It was a useful "utility" in some cases, but dangerous in others. bug: 18027885 Change-Id: Ia02ffe86b5ef5caecbe86069967a549ff09335e5
* | Merge "Repurpose "HexEncoding" for internal users."Narayan Kamath2014-12-165-97/+179
|\ \ | |/ |/|
| * Repurpose "HexEncoding" for internal users.Narayan Kamath2014-12-165-97/+179
| | | | | | | | | | | | | | | | | | Frameworks callers either roll their own or use an internal apache class. Given that apache is going away, we need to provide them with an alternative. bug: 18027885 Change-Id: Iec01cba9f3d2027828457c0b450eac0dd08fcaf6