| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Framework".
Using a non-existent TLD is now a Bad Idea.
(cherry-pick of a7d651e95e38974fa0de19247e8341df98a0b1b1.)
Bug: 17146413
Change-Id: I6a68b4609d59a6d56ba780d03ffcf24a2759db48
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fix a missing case from one constructor by delegating to another.
Change-Id: I8b85c97586dde2d72c9ac21216c594aa810d761b
|
|/
|
|
|
|
|
| |
(cherry-pick of ebe417d7808ac5bce5bc14d36d6af4c31218326d.)
Bug: 16938600
Change-Id: I7334c1ea57ea0593b3e0bd7943f8a5208c704881
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: 17049821
Change-Id: I309ecfad7e38cf664518a92d6812ffbd90060b79
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 16162465
Change-Id: Iea4d39e1bb74be7ad9041aa3dbb5809d53f63faf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I4dba2cfe07cf0c5ce28a0ff4540aa68d9c664a2a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
zip archive makes a copy of a prefix and maintains it's lifecycle now.
Change-Id: I55adc4c9eefee96b80038fb7dbb95dbe498d5a73
|
|
|
|
|
|
|
| |
Call EndIteration in IterationHandle destructor. This will free the
memory allocated for cookie in StartIteration.
Change-Id: I12c861c7da2437113c669a0c7f41b5585ed94c72
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
Yet we were incorrectly upper-casing them inside forLanguageTag.
bug: 16811867
Change-Id: I088161c4c7769908f35b9f2b7d945fb1cd1fd7ac
|
| |
| |
| |
| |
| |
| |
| | |
It seems that this field is never used outside the internal constructor so it
can be a local variable instead.
Change-Id: I2aa26fb3fd13c571224a9aee14c7eea93e5c9591
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit c4da34ca5792e0c73577f868249fdfe8a11a01f6.
Change-Id: I1b93ecfcb8a867a670af717eb25c7076b7097d5c
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The SubjectKeyIdentifierStructure class is no longer in Bouncycastle.
Change-Id: Ie5eb91a14ec38f773ef22754d77651a161fd7122
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems that this field is never used outside the internal constructor so it
can be a local variable instead.
Change-Id: Icd9e009a24ae22da8f5dfd18b9f0ab80913129d4
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
and GenericArrayTypeImpl.
Bug: 14590652
Bug: https://code.google.com/p/android/issues/detail?id=74060
Change-Id: Ib9a30b741a8d5f82d21f37ca8959bf5b2893f8db
|
| |
| |
| |
| |
| |
| |
| | |
(cherry-pick of 77926e913a14b9541df38b6175f795f2ca6c5266.)
Bug: 15715370
Change-Id: I2d99f070c3debea01621a172d8189951a56736b5
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
locale and zoneStrings are not accessed outside of
DateFormatSymbols.
Bug: 16502916
Change-Id: I67907cf6b0ebc2e6a2dd0bfe8728ba6d0487d5a3
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 7955614
Change-Id: Iecdd939f25579f882c11d2957c2a5667d2f7fd3a
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I70a591093557ce3dd0471bcc7e888d630c80bb88
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously we'd throw ArrayIndexOutOfBoundsException for U+2066..U+2069.
Now we'll return DIRECTIONALITY_UNDEFINED. I've exposed (via @hide) the
underlying icu4c implementation so that frameworks code at least can work
with the new explicit bidi formatting characters.
Bug: 15492712
Change-Id: I96583c7e1c6be26d3f1a857615a1042d58e9feaf
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Don't bother to reload the default SocketFactory if the requested
classname didn't change since the last time.
Also make the warning when classloading fails more terse. Most of the
time the ClassLoader is wrong, so giving them a hint via
ClassLoader#toString is sufficient.
Bug: 16468683
Change-Id: I36844e942ccadda993c9f5a1523b2a66280903f3
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Expose PR_GET_DUMPABLE and PR_SET_DUMPABLE via java.
This is a cherrypick of two commits from internal master:
* 1fc6b04adc87e752aa35bedb7617b5145d835d7c
* 514b1d21f66caff9f26fcf042882c5115b5431c4
Change-Id: Ibb60ed1d00c3a84fa77a34d0acc56cb995d14e1c
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As a result of improved benchmarking, the arraycopy function runs 35% faster
on average than a straight call to the native code for arrays of length 32 or shorter.
Bug: 7103825
Change-Id: I68600b01a6218d761be874528cfa70de56efdfdc
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This removes the workaround for broken TLS/SSL server certificates
that were being presented by android.clients.google.com in early 2012
(8576f309825e23add080f2a50345ec1884939c39). The server is presenting
better certificates these days and the workaround is no longer needed.
Bug: 5426333
Change-Id: I4e7be7bcf522f2d210a596aa03b86a19884e075a
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Thanks to apphelia@ for the report.
The readObject() implementation had hardcoded the
field order incorrectly leading to a couple of
fields being swapped on each serialization:
paramsAlg and sealAlg. This was wrong as far back
as 2009 so the class has likely never worked for
its intended purpose. Field order during
Serialization is primitives first, then fields.
Secondary ordering is alphabetical.
The purpose of overriding readObject() at all is for
safety in the event of compromised stream data.
It would be more appropriate to clone() rather than
readUnshared(). readUnshared() assumes a
corresponding writeUnshared(), which is not present.
The readUnshared() probably only works here because
the byte[] arrays typically are not shared anyway.
From reading latest guidelines on safe serialization
the code need not be order-specific: it can use
readFields(). s.defaultReadObject() could have been
used instead but the guidelines recommend against.
Performance is probably not a concern.
Until now nobody could have been using SealedObject
for its intended purpose otherwise they would have
noticed this bug (or they were always serializing /
deserializing an even number of times!).
Anybody attempting to use SealedObject on earlier
versions of Android will need to serialize /
deserialize twice to avoid the bug. After this fix
the class will work as intended.
Additional:
Some duplicated code has been extracted into methods,
and streams are now closed when they are finished
with. In reality this will have no effect
given the stream implementations involved.
Bug: https://code.google.com/p/android/issues/detail?id=73235
Change-Id: If745d6556437ae7839543e66dd15f912afd4ec98
|