| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
No spurrious failures if the sleep finishes before the RemoveThread
is inside the try catch block.
Bug: 19384923
Change-Id: I81e340e97eff5e1d011e980c2f89dfa679662547
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This change might look like a hack, but the API it
implements is more than worthy of it.
bug: 19011159
Change-Id: I8a539f1b54282220fbb0a005a750819fa7873cc9
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two consecutive single quotes ('') must be interpreted as an
escaped single quite sequence. We were implementing it by simply
keeping track of whether the last character was a single quote.
This is insufficient for sequences of three or more quotes since
we shouldn't emit ('') for an escape sequence of ('''). We'll have
to keep track of the number of consecutive quotes we've seen in the
input instead.
This is a partial fix for the bug below. There appears to be another
bug in MessageFormat itself in its handling of subpatterns.
bug: 19011159
Change-Id: Ia71e5d8c1962356cabc265cf80ebc0a04ff84f17
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We'd like ChoiceFormat.toPattern to emit a pattern that's parseable
by ChoiceFormat - which means we need an infinity that's parseable by
NumberFormat.parse().
Also, implement the nextDouble / previousDouble public API <sadface/>
in terms of Math.nextAfter and Math.nextUp.
bug: 19149384
Change-Id: Ieb13ee70c212d188ff9fde09463ced8d632f47ab
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Chile has changed the rules for DST. The test duplicates
testApia below it, so it can be removed.
Bug: 19212588
(cherry-picked from commit ebfb8f8b0ee0c0a75d92d8fc56ccd0d87ee7e9ad)
Change-Id: Ibe7c0dc510813826dca13993b6600d368e03740a
|
|\ \
| |/
|/| |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the DateUtils' relative time formatting APIs
(getRelativeTimeSpanString, getRelativeDateTimeString) to use ICU ones.
Two APIs that take withPreposition parameter are not changed. Because
(a) ICU doesn't provide functionality to format preposition; (b) They
are not really computing relative time but instead calling
formatDateRange() to get the absolute time/date string.
Benchmark results on aosp_hammerhead-userdebug:
before:
benchmark us linear runtime
DateUtils_getRelativeDateTimeString 127.1 ==========================
DateUtils_getRelativeDateTimeString_ABBREV 145.0 ==============================
DateUtils_getRelativeTimeSpanString 28.0 =====
DateUtils_getRelativeTimeSpanString_ABBREV 27.9 =====
now:
benchmark us linear runtime
RelativeDateTimeFormatter_getRelativeDateTimeString 119.2 ==========================
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 133.8 ==============================
RelativeDateTimeFormatter_getRelativeTimeSpanString 24.6 =====
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 24.7 =====
Bug: 19146457
Bug: 5252772
Change-Id: Ief74608354964a17e42191d7b1a58964f3a9acfd
|
|\ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation considers user.locale / region / language
immutable if set at the command line.
For the purposes of this test, we'll have to resort to changing
the unchangeable by hand. Fortunately, we already have such a
function thanks to the native bridge.
bug: 19329061
Change-Id: I583a0da355503b547c60e2df6da4c23ac5882e4a
|
|\ |
|
|/
|
|
|
|
|
|
|
|
| |
I think I closed the previous bug report as "unless otherwise stated, you
should assume that passing null to anything gets you a NullPointerException",
but this is at least the second time this specific case has been reported as
a bug, so...
Bug: https://code.google.com/p/android/issues/detail?id=136551
Change-Id: I5993bbf405054f57cd4f7c05af38e6c9d66355e7
|
|\ |
|
|/
|
|
|
|
|
|
|
|
| |
Repeated calls to flush() should not result in repeated calls to
implFlush(), leaving CharsetEncoder implementations free to do such
things as unconditionally prepend headers in their implFlush(). ICU4J
does that.
bug: 19251672
Change-Id: Id6399c16a60b0ec7f73248e431741fe5432c9c3a
|
|\ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying inflate & deflate can process any amount of data
correctly, since the protocol is chunk based (the size of each
chunk is limited to 32 bits, usually) and there is no limit to
the number of chunks.
On LP32, the stream counters are limited to 32 bit counts and
the manual recommends that the caller maintain their own counters
to support larger counts.
<quote>
Note however that the strm.total_in and strm_total_out counters may be
limited to 4 GB. These counters are provided as a convenience and are
not used internally by inflate() or deflate(). The application can
easily set up its own counters updated after each call of inflate()
or deflate() to count beyond 4 GB.
</quote>
Change-Id: I066e1141935154773360c1b9f94c56bd604f8474
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Don't allow glibc's TEMP_FAILURE_RETRY on 32 bit hosts, it will
truncate 64 bit return types such as from lsee64, sendfile etc.
Change-Id: I009510a69ec80d42a17192bf960b056456bd88f5
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If run as root, ps(1) will list far too many processes, some of which
might coincidentally be zombies.
Note that we wanted "ps S" to show the STAT field, not "ps s" to
show the signal masks which also shows the STAT field as a side-effect.
Change-Id: Iedbcb45b871b1207248cb59c3a5fae9be5b0b3e2
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Throwing NumberFormatException for bad Unicode escapes was a bug.
The test I added when I fixed that was in a different file, and
apparently I didn't re-run these tests.
Bug: https://code.google.com/p/android/issues/detail?id=103641
Change-Id: I271063ef12eab1369e4ce4cbbb7dd00e15c9ce79
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| | |
BUG: 19165288
Change-Id: I1112170a917fe9f5c5482544edae3d326832f638
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Confirm that Etag headers are implemented correctly.
Bug: https://code.google.com/p/android/issues/detail?id=108949
Change-Id: Ida716d089ab1367ae955bb110a450c63ce3a1fa9
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch provide the additional check for “z”.
The “if” statement checks whether the double precision value z, is at the end of a binade
(a term used to describe the set of numbers in a binary IEEE 754 floating-point format that
all have the same exponent, i.e., a binade is the interval [2n, 2n+1) for some value of n.)
If so, it needs to adjust for the change of ulp (unit of least precision is the spacing
between two consecutive floating-point numbers, i.e., the value the least significant digit
represents if it is 1). The adjustment is done by the “simpleShiftLeftHighPrecision” routine.
This is all necessary, except when z is close to denormal (i.e. DOUBLE_TO_LONGBITS(z)==DOUBLE_NORMAL_MASK)
where no adjustment is needed since the ulp should remain the same once z becomes denormal.
This means we can remove the old hack that counted how many times we'd
incremented or decremented, so this patch removes the DECREMENT_DOUBLE
and INCREMENT_DOUBLE macros.
This patch also contains the float equivalent of everything mentioned above,
plus some new tests.
Finally, this patch removes the USE_LL conditional compilation because it
was always true.
Bug: 18087920
Change-Id: I4a9112f012dfd9eeb8db89f0652528b6c02e8f1e
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Cipher.update(byte[], int, int inputLen) is supposed to return null
when inputLen is zero. This CL makes it so. Prior to this CL, this
method returned an empty byte array.
Bug: 19100173
Change-Id: I5698f11f76a17dd8fc2509be5d8ec9369a888eaf
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This CL adds basic tests which capture the ClientHello emitted by
SSLSocket and assert that the various fields are as expected. In
particular, this CL adds tests for:
* client protocol version,
* cipher suite list,
* compression methods,
* server_name extension (SNI).
Change-Id: I387c44363ad26f064885f9bfa28572da37871078
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | | |
Change-Id: I69ddea2941400881ef64309d2470953d25136c1a
|
|\ \ \
| | | |
| | | |
| | | | |
escape."
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only our documentation claims that any of the JSON code throws
NumberFormatException, and throwing JSONException seems much more in keeping
with the rest of the API (and makes it easier for callers to handle errors).
Bug: https://code.google.com/p/android/issues/detail?id=103641
Change-Id: I4f4ebfd983f4ccb2a1f266a0bfa5732174df26f6
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some of the libcore's tests indirectly depend on okhttp being in the
CLASSPATH.
Change-Id: Iff5b7f361d088a08c31e7fcdea3ef243f4a2fe44
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 5eba1f238e37e3fef73b492badb950225150cdcf and
adds additional code to set user.language / user.region for backwards
compatibility.
The original commit had a static initialization order bug, so this
change reorders static fields so that GRANDFATHERED_TAGS is initialized
before the default locale.
We also set user.language / user.region for backwards compatibility. The
android framework have been changed to pass in user.locale instead of
user.language / user.region but we parse that value and set
user.language / country for code that still relies on it.
bug: 17691569
Change-Id: Ie5e8ffe4bafa3977fea27289f9ffc5100288cab3
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A few places in libcore consider the local address of an unbound
socket to be Inet4Address.ANY. For example, calling
getLocalAddress on an uncreated Socket will return 0.0.0.0, and
when creating a DatagramSocket, libcore attempts to bind it to
0.0.0.0 unless the caller specifies another address.
On Android, this is incorrect. All native socket filedescriptors
that underpin Java socket objects are created by IoBridge.socket,
and are dual-stack AF_INET6 sockets, not AF_INET sockets. When
such a socket is created, its local address is ::, not 0.0.0.0.
Thus, for example, calling getLocalAddress on a just-created
ServerSocket object will return ::. Binding to 0.0.0.0 is not
even allowed by os.bind, which silently converts it to :: instead
(in inetAddresstoSockaddr).
Therefore, accept reality and use :: instead of 0.0.0.0 in the
Java layer as well. Specifically:
1. Change DatagramSocket's constructors to bind to :: instead of
0.0.0.0. This is a complete no-op, because os.bind() silently
converts 0.0.0.0 into ::. Add a test for the other of the two
codepaths.
2. Change InetSocketAddress so that an uninitialized object has
an IP address of :: and not 0.0.0.0, and update its test. This
is unlikely to break anything short of an app that explicitly
depends on this behaviour, because os.bind() converts 0.0.0.0
to ::, and because any SocketAddress returned by any real
socket will never contain 0.0.0.0 anyway.
3. Change Socket so that calling getLocalAddress() when there is
no underlying socket file descriptor is will return :: instead
of 0.0.0.0. This is more correct, because it's consistent with
sockets that have been created, which will never have a local
address of 0.0.0.0.
Tested: vogar $(find libcore/*Socket*Test*) all passes on device.
Bug: 18094870
Change-Id: I9d60710fe945a99d6a5e65430248a889008ef4b1
|
|\ \ \ \
| |/ / /
|/| | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Was only around to work around perforce issues, and we have
a copy of this file checked in anyway.
Also, gets rid of an unused constant referencing the name.
Change-Id: Iddd5871130d779455f8ff960703945dc1d745e18
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Broken by the move to toybox. Instead of double guessing the
error message, just assume that all "cat" variants (host / target etc.)
output the name of the "bad" paramater to the error stream.
Change-Id: If19fa737e0d3a3dd023185fa23854da3022020fa
|