summaryrefslogtreecommitdiffstats
path: root/luni
Commit message (Collapse)AuthorAgeFilesLines
* Change ReferenceQueue.add to append at end of the unenqueued listMathieu Chartier2014-09-051-3/+12
| | | | | | | | | We now append the singly linked list at the end of the queue. Previously the list was added after the first element of the unenqueued list. Bug: 17381967 Change-Id: I6d4eb1053e5a2babd559e410b42344a04490e7b5
* Merge "DecimalFormatSymbols with a null locale should throw."Narayan Kamath2014-09-051-0/+4
|\
| * DecimalFormatSymbols with a null locale should throw.Narayan Kamath2014-09-051-0/+4
| | | | | | | | | | | | | | | | | | | | We left this out when manually auditing the list of classes that don't throw and silently use the default (like Calendar) vs those that do. See bugs 16938922 and 15849709. bug: 17394277 Change-Id: I6e1dae3c9251dfd48221914351a504f24f4bdf5d
* | Make sure calendars are compared correctly.Narayan Kamath2014-09-051-3/+11
|/ | | | | | | | | | The calendars will use System.currentTimeMillis if we don't explicitly call setTimeMillis or setTime. We don't particularly care about time here, we just need to check that all Locale derived fields are equal. bug: 17377252 Change-Id: Ibd5e74c237e5520580f1f44b4e98b021000639fa
* Fix race in finalizeAllEnqueued.Mathieu Chartier2014-09-041-1/+7
| | | | | | | | | | | | | | | | | | The problem was as follows: The GC finishes and enqueues all cleared references on the ReferenceQueue.unenqueued list. Then someone calls finalizeAllEnqueued which enqueues a finalizer reference directly on the finalizer reference queue. However the recently cleared references had not yet been processed by the ReferenceQueueDaemon resulting in the sentinal being finalized before the objects which were freed in the GC. The fix is enqueuing the sentinel finalizer reference on the unenqueued queue. (cherry picked from commit 2cc3d41ff2dfd673fa1ab4ef2a46525933d523ec) Change-Id: I0598199ef56aa8bd9e1fa40c39d50b2785dc5c10
* Merge "Fix apache-harmony logging tests"Neil Fuller2014-09-043-19/+67
|\
| * Fix apache-harmony logging testsNeil Fuller2014-09-043-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed SocketHandler to re-introduce a "socket != 0" check unintentionally removed by commit 232c91dce1760b180155256d1896d0d80375ff6d. Some failures are the result of the test code being newer than the libcore code. Android took its last libcore update from apache-harmony some time after r820767 but before r929953 and its test-code update at r1097236. This explains a few things. Updated FileHandler to deal with null system properties. This is an equivalent change to http://svn.apache.org/viewvc?view=revision&revision=935099 Updated XMLFormatter to handle basic XML escaping. This is an equivalent change to http://svn.apache.org/viewvc?view=revision&revision=929953 Unsuppress tests that are fixed by this. Bug: 13882147 Change-Id: I36321b488da6d4e08fbb0d28d0e366f9b06e6371
* | Rearrange a few of our MIME type registrations.Elliott Hughes2014-09-042-6/+13
| | | | | | | | | | | | | | | | | | | | Based on looking at IANA and wikipedia. Bug: 16978217 (cherry picked from commit 93235f904ce83fe138c90a90c66d0e78f9f405b8) Change-Id: I272436facd3c2f5dbc8c455fc340293b83f98453
* | Merge "Fix SDK and docs build."Neil Fuller2014-09-042-13/+13
|\ \
| * | Fix SDK and docs build.Eino-Ville Talvala2014-09-042-13/+13
| |/ | | | | | | | | | | | | | | Replace {@link} references to hidden methods with {@code}. (cherry picked from commit f73b1089c7236a7268ccce10546cc340a36f8c4b) Change-Id: Iff245542979c2bbcea8b6c4b4632547c6aac4da4
* | Keep qtaguid quiet by not trying to untag non-sockets.Elliott Hughes2014-09-035-4/+51
|/ | | | | | | (cherry-pick of f6cf9efb212e572dcd2e902ca461af6323793dbf.) Bug: 17203955 Change-Id: I0999fc0ff295986b92e31568d96e321b9e7ffb2c
* Work around the snappily-titled ICANN "Name Collision Occurrence Management ↵Elliott Hughes2014-08-222-4/+4
| | | | | | | | | | | Framework". Using a non-existent TLD is now a Bad Idea. (cherry-pick of a7d651e95e38974fa0de19247e8341df98a0b1b1.) Bug: 17146413 Change-Id: I6a68b4609d59a6d56ba780d03ffcf24a2759db48
* Merge "Avoid wrapping Class in WeakReference when class loader is null."Ian Rogers2014-08-221-7/+1
|\
| * Avoid wrapping Class in WeakReference when class loader is null.Ian Rogers2014-08-221-7/+1
| | | | | | | | | | | | Fix a missing case from one constructor by delegating to another. Change-Id: I8b85c97586dde2d72c9ac21216c594aa810d761b
* | Support narrow am/pm markers in LocaleData.Elliott Hughes2014-08-223-2/+44
|/ | | | | | | (cherry-pick of ebe417d7808ac5bce5bc14d36d6af4c31218326d.) Bug: 16938600 Change-Id: I7334c1ea57ea0593b3e0bd7943f8a5208c704881
* Fix abuse of Runtime.freeMemory.Narayan Kamath2014-08-211-41/+37
| | | | | | | | | | Runtime.freeMemory is the largest allocation that's possible *without a heap expansion*. That's a poor proxy for "can i allocate this byte array" and leads to flaky CTS tests. bug: 17021619 Change-Id: I108138bf2402e899a40a0b3081c083f733e7c999
* Fix init test cases from DexClassLoaderTest.Calin Juravle2014-08-211-32/+52
| | | | | | | | | | | | | Because the tests cases are executed in the same runtime and the class linker may cache generated optimized files, init tests need to use their own optimized directories (so that they can reliable test the number of generated files). Bug: 16806146 (cherry picked from commit 58c130c1eb99cc72998150d813b3e31896e3bfaf) Change-Id: I8111cc7ea640f3bc94821fcd4380acfc078c746f
* bionic has always had gettid.Elliott Hughes2014-08-201-1/+2
| | | | | Bug: 17049821 Change-Id: I309ecfad7e38cf664518a92d6812ffbd90060b79
* Merge "Update ziparchive usage to the new API."Piotr Jastrzebski2014-08-161-2/+3
|\
| * Update ziparchive usage to the new API.Piotr Jastrzebski2014-08-151-2/+3
| | | | | | | | | | Bug: 16162465 Change-Id: Iea4d39e1bb74be7ad9041aa3dbb5809d53f63faf
* | Avoid triggering StrictMode when closing a socket.Elliott Hughes2014-08-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, we called getsockoptLinger unconditionally, using ENOTSOCK to recognize the non-socket case, but the cost of throwing an exception is so high (both on dalvik and art) that we worked around that by doing an fstat first. This was mostly fine, but fstat calls onReadFromDisk, which isn't true for the socket case (which causes upset for threads that are allowed to touch the network but not allowed to touch disk, which Chrome uses, even though it's not immediately obvious to me why that makes any sense). (cherry-pick of d636777d624428dfc51d1181f47602f389eb4cce.) Bug: 4972558 Bug: 12133112 Change-Id: Ic0b89d1f181e436b4f43c1c04c1f706883ab84c0
* | Fix parsing of fractional seconds.Narayan Kamath2014-08-142-2/+37
|/ | | | | | | | | | | | | We were just parsing them as millisecond values, which is wrong. ".1" fractional second is 100 milliseconds (we were parsing it as 1 ms), and ".765432" fractional seconds is 765 milliseconds (we were parsing it as 765432ms. In most cases, this was hidden by the fact that we were formatting such values incorrectly as well. bug: 16969112 Change-Id: Id287684f78691090ac4a6c3029d7909f2c1e1310
* Allow Calendar.getInstance to be called with a null Locale.Narayan Kamath2014-08-139-0/+105
| | | | | | | | | | | | | LocaleData.get was changed to throw for null locales instead of falling back to the default, so we need to adjust callers accordingly. Turns out all other callers would've thrown anyway (for different reasons) so this change makes those exceptions explicit and adds tests for them. bug: 16938922 Change-Id: I3e77435a6b414b002b96a4f8deb44b51591c5a51
* Make parameter name match comments for sdk build.Jeff Hao2014-08-111-1/+1
| | | | Change-Id: I4dba2cfe07cf0c5ce28a0ff4540aa68d9c664a2a
* Merge "Implements some StrictMath functions for improved performance."Jeff Hao2014-08-112-38/+476
|\
| * Implements some StrictMath functions for improved performance.Emma Meersman2014-08-112-38/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions ceil, floor, hypot, IEEEremainder, nextafter, and rint have all been implemented in Java to save the native call. Benchmarking numbers to show this performance improvement are included: Native call (before change): benchmark=Ceil: 97.40 ns; σ=0.02 ns @ 3 trials benchmark=Floor: 98.73 ns; σ=0.02 ns @ 3 trials benchmark=Hypot: 714.62 ns; σ=0.44 ns @ 3 trials benchmark=IEEEremainder: 180.31 ns; σ=0.08 ns @ 3 trials benchmark=NextAfterD: 110.47 ns; σ=0.02 ns @ 3 trials benchmark=NextAfterF: 96.20 ns; σ=0.01 ns @ 3 trials benchmark=Rint: 92.21 ns; σ=0.02 ns @ 3 trials Java implementation (after change): benchmark=Ceil: 47.32 ns; σ=0.01 ns @ 3 trials benchmark=Floor: 42.03 ns; σ=0.00 ns @ 3 trials benchmark=Hypot: 69.42 ns; σ=0.37 ns @ 3 trials benchmark=IEEEremainder: 49.64 ns; σ=0.04 ns @ 3 trials benchmark=NextAfterD: 63.32 ns; σ=0.17 ns @ 3 trials benchmark=NextAfterF: 64.67 ns; σ=0.12 ns @ 3 trials benchmark=Rint: 31.10 ns; σ=0.41 ns @ 10 trials Change-Id: I9ee926514c0661cdb7a1e6ae3acfe5c31a4b9f20
* | Fix TimeZone.getAvailableIDs(int).Elliott Hughes2014-08-111-8/+24
|/ | | | | | | | | | | | | This was broken by the removal of the pre-computed raw offsets from the tzdata file. I think that's still the direction we want to go (with us hopefully using more of icu4j at some point, and eventually relying solely on the icu time zone data), so this patch adds code to lazily evaluate all the offsets by instantiating all the time zones. (cherry-pick of 065d7764ac1dfe74ee94d17ca6c810de37b57d3e.) Bug: 16947622 Change-Id: I6d1dfe5ee6c99338f9807c3af5b6f04539c256c3
* Stop keeping iteration prefix around.Piotr Jastrzebski2014-08-111-10/+4
| | | | | | zip archive makes a copy of a prefix and maintains it's lifecycle now. Change-Id: I55adc4c9eefee96b80038fb7dbb95dbe498d5a73
* Remove memory leak.Piotr Jastrzebski2014-08-111-0/+1
| | | | | | | Call EndIteration in IterationHandle destructor. This will free the memory allocated for cookie in StartIteration. Change-Id: I12c861c7da2437113c669a0c7f41b5585ed94c72
* Merge "Implements some math functions for faster performance"Jeff Hao2014-08-082-129/+1006
|\
| * Implements some math functions for faster performanceMichael Chen2014-07-242-129/+1006
| | | | | | | | | | | | | | | | | | Changes cosh, exp, expm1, log, log10, sinh, cbrt, asin, acos, atan, tanh, log1p These functions are now implemnted in java to save the overhead of a jni call Change-Id: I4d3b70dd1693378af5b04cbbe0fecd95d97c1cff
* | Variants are case sensitive.Narayan Kamath2014-08-082-6/+13
| | | | | | | | | | | | | | Yet we were incorrectly upper-casing them inside forLanguageTag. bug: 16811867 Change-Id: I088161c4c7769908f35b9f2b7d945fb1cd1fd7ac
* | Remove nameLength field from ZipEntry.Piotr Jastrzebski2014-08-082-11/+6
| | | | | | | | | | | | | | It seems that this field is never used outside the internal constructor so it can be a local variable instead. Change-Id: I2aa26fb3fd13c571224a9aee14c7eea93e5c9591
* | Merge "Revert "Remove nameLength field from ZipEntry.""Narayan Kamath2014-08-072-5/+10
|\ \
| * | Revert "Remove nameLength field from ZipEntry."Narayan Kamath2014-08-072-5/+10
| | | | | | | | | | | | | | | | | | This reverts commit c4da34ca5792e0c73577f868249fdfe8a11a01f6. Change-Id: I1b93ecfcb8a867a670af717eb25c7076b7097d5c
* | | Merge "Track bouncycastle upgrade to 1.51"Kenny Root2014-08-071-2/+2
|\ \ \ | |/ / |/| |
| * | Track bouncycastle upgrade to 1.51Kenny Root2014-08-071-2/+2
| | | | | | | | | | | | | | | | | | The SubjectKeyIdentifierStructure class is no longer in Bouncycastle. Change-Id: Ie5eb91a14ec38f773ef22754d77651a161fd7122
* | | Remove nameLength field from ZipEntry.Piotr Jastrzebski2014-08-072-10/+5
| | | | | | | | | | | | | | | | | | | | | It seems that this field is never used outside the internal constructor so it can be a local variable instead. Change-Id: Icd9e009a24ae22da8f5dfd18b9f0ab80913129d4
* | | Implement equals and hashCode in ParameterizedTypeImplPiotr Jastrzebski2014-08-072-4/+40
|/ / | | | | | | | | | | | | | | and GenericArrayTypeImpl. Bug: 14590652 Bug: https://code.google.com/p/android/issues/detail?id=74060 Change-Id: Ib9a30b741a8d5f82d21f37ca8959bf5b2893f8db
* | Fix MimeUtils to treat ".flac" as "audio/flac".Elliott Hughes2014-08-053-25/+56
| | | | | | | | | | | | | | (cherry-pick of 77926e913a14b9541df38b6175f795f2ca6c5266.) Bug: 15715370 Change-Id: I2d99f070c3debea01621a172d8189951a56736b5
* | Don't account buffer.arrayOffset() twice.Narayan Kamath2014-07-312-2/+2
| | | | | | | | | | | | | | | | data[OUTPUT_OFFSET] from the perspective of native code must always be the offset from the start of the buffer passed in to it. Change-Id: I4a5c9595aebd105c57ce2239dc95cf85d5bd6256
* | Fix LocaleInternalsTest.Narayan Kamath2014-07-312-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | - After the new Java forLanguageTag implementation, bogus locales really do result in "und". - Fix a regression in unicode extension parsing, where we would always add a "null" to the keyword set. - Improve test assertions so that the reason for failure is obvious. bug: 15849709 Change-Id: I26fb348b872badb7844587cf290429e15dbb0f0e
* | Add ICU.addLikelySubtags(Locale).Narayan Kamath2014-07-312-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need a replacement for ICU.getScript(String), Locale.getScript() can be used instead. The old definition of the function has been left public for the support library to use (though we could remove it if we modify the support lib). Note that addLikelySubtag returns a String that's language tag like, but uses underscores instead of hyphens to separate subtags. bug: 15876704 Change-Id: I6c7d289c4b725a83900e38dd5bbed026afd9ac4e
* | Make some DateFormatSymbols fields privateNeil Fuller2014-07-311-2/+2
| | | | | | | | | | | | | | | | locale and zoneStrings are not accessed outside of DateFormatSymbols. Bug: 16502916 Change-Id: I67907cf6b0ebc2e6a2dd0bfe8728ba6d0487d5a3
* | Merge "Fix the OOME in ScannerParseLargeFileBenchmarkTest"Neil Fuller2014-07-291-38/+67
|\ \
| * | Fix the OOME in ScannerParseLargeFileBenchmarkTestNeil Fuller2014-07-301-38/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scanner had no mechanism for recovering buffer space it didn't need. Now, if the buffer is more than 50% full of ignorable characters the remaining characters are shuffled to the beginning to recover space. For most expected usecases this means that the buffer will stay 1k and contain up to 512 characters of useful data. A growable, circular character buffer could have been introduced to avoid the copy but is not worth the effort. Previously the buffer would double in size until the data or memory was exhausted, and each read would also double in size to fill the empty half of the buffer. This was fine providing the input could fit in memory. On top of that the 1k, 2k, 4k, etc. buffer was repeatedly turned into a String and passed to the (native) matcher, and then the matcher was told to ignore more than half of it. As a consequence of keeping the buffer a fixed size (and only filling 50% of it at a time), this change may cause a performance regression: for most usecases where delimiters are closer together than 512 bytes, reads after the first will now usually be 512 bytes and not the 1k, 2k, 4k, etc. it was previously. Having fixed the test so it doesn't OOM, the test now takes 6 minutes to pass on host and so is unsuitable for inclusion in CTS tests and so is being suppressed. This change also includes so tidy up changes to the test and the Scanner class. The implementation could no doubt be improved but the API makes it inherently slow. It would be surprising if anybody uses the Scanner class on Android with so many better alternatives. Bug: 14865710 Change-Id: I40a7fc0c2bfaf6db4e42108efe417303e76bde24
* | | Merge "Remove an obsolete Pacific/Apia hack."Elliott Hughes2014-07-301-6/+0
|\ \ \
| * | | Remove an obsolete Pacific/Apia hack.Elliott Hughes2014-07-291-6/+0
| | | | | | | | | | | | | | | | | | | | Bug: 7955614 Change-Id: Iecdd939f25579f882c11d2957c2a5667d2f7fd3a
* | | | Merge "Change the DateFormatSymbols serialized form"Neil Fuller2014-07-234-56/+77
|\ \ \ \ | |/ / / |/| | |
| * | | Change the DateFormatSymbols serialized formNeil Fuller2014-07-304-56/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding locale to the serialized form of DateFormatSymbols. Some duplicated code around the generation of numeric / offset timezone strings (e.g. GMT+08:00) has been removed. A new hidden method has been added to TimeZone to create this string. The timezone string lookup has been moved into LocaleData and it now has a single path rather than treating the customZoneStrings path as special. customZoneStrings has been removed from DateFormatSymbols because it would potentially have an incorrect value after serialization and it is no longer required. Bug: 16502916 Change-Id: I2b317e34ba4772beb372a75dd08c95113408b9cc