| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
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
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
Thanks to Robbie Hott for the bug report.
Bug: https://code.google.com/p/android/issues/detail?id=71216
Change-Id: I402fa27e0b90c1c1d26169d79c7061e4a2caa138
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For locales whose language code is "und" we use Locale.ROOT
instead. This also fixes two other corner cases :
- We were using the wrong locale to fetch timezone strings
when the input locale was null. we now use the same locale
throughout by making sure we don't perform any subsititutions
in LocaleData.get.
- Adds a clearer comment about the broken serialization
behaviour.
bug: 15849709
Change-Id: I95e7eb0ccb7458711038ce9b1c76b3279acda9d6
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The goal here is to have a csv file with math tests that
different parts of Android can all use the same math tests.
This change provides these initial csv files as well as the
corresponding testing framework for libcore.
Change-Id: I56430bd9224d92853aefa5024d6fdd1d10dfb255
|
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Bug: 16486921
Bug: 16449607
Change-Id: Ib1871d0fa09bfc3fbf3c041f56ee74fd7a234a5a
|
| | |
| | |
| | |
| | |
| | | |
Bug: 15765976
Change-Id: Ic743168a54ff96e5403a9c73c27eeb7d482a01dc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This prevents us from having to parse ICU locale IDs
or construct them in java. Note that the changes to
LocaleTest bring us in line with the spec (some of the
previous tests demonstrated wonky ICU4C behaviour we
didn't want).
This change includes a minor fix to unicode extension
parsing, we now accept keywords with empty values which
the spec allows.
bug: 15661724
bug: 15849709
Change-Id: If9417ab4cb545fdb8b9a0a47a7eade6ebbe33ba8
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's already one copy in the frameworks (in the resource
system) and we will need to add another copy to the code that
sets system locales from the SIM.
Change-Id: I24d88ea8da0c4f1de26dde2f86e4880507b1da4b
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| | |
Bug: 16449607
Change-Id: I4a854d55f49fe709965c6b6a769fb58c356627dc
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In existing implementations of JSSE Cipher providers, calling "doFinal"
resets the cipher to the state it was at when "init" was called. Note
that this is dangerous to do, but it appears some people do it.
Bug: 16298401
Bug: http://code.google.com/p/android/issues/detail?id=73339
Change-Id: I32e26fde660dc7c50fdac0d74d5d97801f1da9f9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 01b6a878d10ee68db87c3d85d137e81a5257a78a.
Contains a fix for when the timezone ID is not found.
This includes a new test.
Change-Id: I2e5e669782ea6caf4e97153ed6b63ca6ee4ef50d
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit a6e8689807f5a8bb9470ce7c26a47455d2d0608d.
Change-Id: I17a0262d169db3418f2f8888195381f778975dc4
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
toArray() was returning entries in reverse order.
toArray(T[]) was correct.
Thanks to Chris Povirk for discovering.
The fix is simple.
Change includes additional tests to avoid regressions.
Test & support code has been cleaned up a little to
improve coverage and make it (slightly) less horrible.
Bug: https://code.google.com/p/android/issues/detail?id=72073
Change-Id: I42ff90e0f592482289cd0cd9fdbdaabf0c17ad93
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This mirrors the single-item cache in localtime.c.
This is in preparation for an upcoming change to migrate
android.format.text.Time over to Java. It will be making
use of the Java ZoneInfo instead of the native
equivalent.
The Java cache has a size of 1 like the bionic one,
though this can easily be increased.
Given the default TimeZone / ZoneInfo was always
pinned, in many cases the memory usage will not
go up noticeably. In scenarios where applications load
timezones besides the default a cache size of 1 potentially
increases pinned memory usage by one ZoneInfo plus
the overhead of the prototype object held by the cache
(which is never returned to callers).
An example ZoneInfo is "Europe/London", which has ~190
transitions (1 int + 1 byte) and ~6 types (1 int + 1 byte).
Overhead of other fields is ~ 13 bytes, plus the ID string.
190 * (4 + 1) + 6 * (4 + 1) + 13 = 993 bytes.
The prototypes held by the cache share the majority of their
memory with their clones returned from
ZoneInfo.makeTimeZone() and so the overhead of introducing
the cache itself should be in the order of a few tens of
bytes at most.
In future we may want to increase the cache size to 2 in
order to support apps that compare / switch timezones to
increase the odds of the default remaining in the cache.
Sizes above 2 look increasingly specialist.
Change-Id: I0b7daa8ad5d334c8d421dfaa6e0421d3c181a915
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Construct the locale object directly instead of having
a list of strings and parsing them by hand.
Change-Id: Ia26ab30cbe7c5e6e10aca81a0d55b213879b5112
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This documents and tests that TLS-PSK cipher suites are enabled
if a PSKKeyManager is provided to SSLContext during its
initialization.
Bug: 15073623
Change-Id: I8e2bc3e7a1ea8a986e468973b6bad19dc6b7bc3c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This also fixes a typo in two TLS-PSK cipher suite names.
Bug: 15073623
Change-Id: I92d289c2b91862529faf6e06f2eb9b0a21d42b52
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently the default SocketFactory is set once and never invalidated.
Use the Services cache version number to know when to invalidate our
cache.
This increases the time to get the default implementation from 63ns to
97ns on a Nexus 7 (2013) aka deb.
Change-Id: I5d46f02fccaa25e5bcea69d5ca0e4924290cf0e1
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add back the DH tests that uses a pre-defined Diffie-Hellman prime and
generator. Keep the tests that try to find safe prime disabled.
Bug: 5513723
Bug: 16188130
Change-Id: If77b14287855528964665e7782be45c5f57434db
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
bug: 15873165
Change-Id: I2ffe1f384e2140b31adb72d1f4eaa029a70428f0
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I58ec1fafdf5524538ac14c52d561bf93d5a6c946
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | | |
(cherry-pick of f39b5ca3c6378c3c36c63889577004b9693ea9c6.)
Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(cherry-pick of 63744c884dd4b4f4307f2b021fb894af164972af.)
Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
(cherry picked from commit 36214feb86a0963b23f34c8c63584252bd757e19)
Change-Id: I96d5109c01e39255b9970f7a515ddd3575a50e56
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 4b999a474eb92e0b89a34de56f3f7979fd491aa1.
Change-Id: Ifd70798e74357ffe14cbc659ad49a9853b3be8c6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Looking at Arrays.asList in isolation, it's easy to
assume that the method returns a java.util.ArrayList
instead of a private static class with the same name
and different behaviour.
Change-Id: Icd75a4a3d0e21c1302ca766e529172cf2de30c2c
|
|/ /
| |
| |
| |
| |
| | |
The generic version of arraycopy does not work. Remove it.
Change-Id: I524289874cfbf62ed0af3c91264180041342c3f1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The use of Calendar.MILLISECONDS was wrong, as was the use of
ZONE_OFFSET without DST_OFFSET. The existing code pretty much
only works for the values tested in the unit test! This patch
adds new tests to make up for that.
I've also added calls to Calendar.clear to ensure we're not
leaking SECONDS and MILLISECONDS from the Calendar instances (which
get initialized to the current wall clock) into our test values.
This hasn't mattered in the past, but actually does matter here
because tests like isMidnight measure down to the millisecond.
Bug: https://code.google.com/p/android/issues/detail?id=72356
Signed-off-by: jasper tsai <jasper3_tsai@asus.com>
Signed-off-by: hellena shih <hellena_shih@asus.com>
Change-Id: I7d57590a95d3f026bdf1b991e0b1ddb47ba9af37
|
|\ \ \ |
|