| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Ref: CYNGNOS-453
Change-Id: I5aaf315f0d2b7b039cacb5de135501cea4f7cf0c
Signed-off-by: Roman Birg <roman@cyngn.com>
|
|
|
|
|
| |
Bug: 20275572
Change-Id: I958056f757f095ad6278624e293a5583d9cee822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In formatting date intervals, we subtract one day from the end time
if it falls on midnight the next day so that both times are in the
same day, thereby avoiding the date appearing in the formatted
interval. We did this by calling endCalendar.roll(Calendar.DAY_OF_MONTH, false).
However, if endCalendar was 1 May 2015 (say), the date rolls over
to 31 May 2015 (this is the documented behaviour of roll).
We now use endCalendar.add(Calendar.DAY_OF_MONTH, -1) which always
subtracts a day so that 1 May 2015 becomes 30 April 2015, this is
the desired behavior.
bug: 20708022
(cherry picked from commit 13faecd3105c23f8a60ce3a5847056489fd2d037)
Change-Id: Ic947c7c65008d23d1cb1b9bde6af35972ac6acd7
|
|\
| |
| |
| |
| | |
* commit '3bb833819dba8d530620ad6d43dc53c3fd54763b':
Add a ZoneInfoDB.hasTimeZone API.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allows us to query the DB without having to clone an object or
an entire strings array.
bug: 19106773
bug: 19987403
Change-Id: I66d466e414972b02a75bcfe68263e74de8b9a768
|
|\ \
| |/
|/|
| |
| |
| |
| | |
StringFactory."
* commit '39f72b16952fbe4aff5c2e080ce9f7f6dbb1b93d':
Removed offset and value from String and added StringFactory.
|
| |
| |
| |
| | |
Change-Id: I55314ceb906d0bf7e78545dcd9bc3489a5baf03f
|
|\ \
| |/
| |
| |
| |
| |
| | |
RelativeDateTimeFormatter"
* commit 'bd7c7451634fa46aef554dd6e09421ce2d6033a6':
Ensure consistency of capitalization in RelativeDateTimeFormatter
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Contains refactoring. Benchmarks below to show no appreciable
negative performance impact to formatters. We do now cache a new
type of formatter.
Benchmarks measured in microseconds on mako.
Before:
DateIntervalFormat_formatDateRange_DATE 244
DateIntervalFormat_formatDateRange_DATE_TIME 256
DateIntervalFormat_formatDateRange_TIME 208
RelativeDateTimeFormatter_getRelativeDateTimeString 207.2
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 218.2
RelativeDateTimeFormatter_getRelativeTimeSpanString 70.5
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 67.4
After:
DateIntervalFormat_formatDateRange_DATE 237
DateIntervalFormat_formatDateRange_DATE_TIME 241
DateIntervalFormat_formatDateRange_TIME 200
RelativeDateTimeFormatter_getRelativeDateTimeString 149.4
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 161.8
RelativeDateTimeFormatter_getRelativeTimeSpanString 71.7
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 69.0
Bug: 20247811
Change-Id: I51075f89ca6b1d8862335e0e5a4d67a5624edfa6
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit 'ccb61deb8f478f91404b75cbe19cb7b9cbcb4f76':
Move java.nio.Charsets to libcore.util.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This isn't public API, and isn't related to NIO. It's only ever
used by java.lang.String.
bug: 10898787
Change-Id: I4e194406746b88ba7268c2553e467e7e05400b40
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
property files."
* commit '69773bd217466a536c9317073a184d3907f58100':
Remove support for reading mime types from property files.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This support was untested and unused and of very limited utility,
given that this class is initialized in the zygote. It also discourages
arbitrary changes to the priority order of mappings.
Change-Id: I2a7f91d2956627cd59f948561c37678bc45d118d
|
|\ \
| |/
| |
| |
| |
| |
| | |
RelativeDateTimeFormatter"
* commit 'b059489d9b120279eff706efda839ff719e722e0':
Use ICU4J more in DateIntervalFormat and RelativeDateTimeFormatter
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
General strategy: Switch to ICU classes for Calendar, and generally
use ICU classes earlier to avoid multiple creations.
This also incorporates some feedback from narayan@ from
https://android-review.googlesource.com/#/c/145662/
Some small optimizations applied but the goal was not to make it
much faster, just to confirm it wasn't much slower. It has sped up
some methods, and slowed down others, but not much difference in
absolute terms.
All times in microseconds measured on a mako.
Original:
RelativeDateTimeFormatter_getRelativeDateTimeString 582.4
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 603.2
RelativeDateTimeFormatter_getRelativeTimeSpanString 39.9
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 39.1
After:
RelativeDateTimeFormatter_getRelativeDateTimeString 207.2
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 218.2
RelativeDateTimeFormatter_getRelativeTimeSpanString 70.5
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 67.4
Original:
DateIntervalFormat_formatDateRange_DATE 290
DateIntervalFormat_formatDateRange_DATE_TIME 298
DateIntervalFormat_formatDateRange_TIME 276
After:
DateIntervalFormat_formatDateRange_DATE 244
DateIntervalFormat_formatDateRange_DATE_TIME 256
DateIntervalFormat_formatDateRange_TIME 208
Change-Id: If043bd55ffec37ed2735aa1593f327b38749218c
|
|\ \
| |/
| |
| |
| |
| |
| | |
DateIntervalFormat/RelativeDateTimeFormatter to ICU4J"
* commit 'c5546c4c0812bba9d9a6b0611839465b9fd4eab6':
Switch DateIntervalFormat/RelativeDateTimeFormatter to ICU4J
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Information below from the existing benchmarks on a hammerhead. All
times given in microseconds. Note that the new version is slower,
but this is a small difference in absolute terms and means less
maintenance for libcore.
The ICU team is rewriting some of the underlying code in ICU4J
for a future ICU release which may alter performance.
ICU4C + JNI
DateIntervalFormat_formatDateRange_DATE 67.8
DateIntervalFormat_formatDateRange_DATE_TIME 76.0
DateIntervalFormat_formatDateRange_TIME 54.8
ICU4J
DateIntervalFormat_formatDateRange_DATE 179
DateIntervalFormat_formatDateRange_DATE_TIME 181
DateIntervalFormat_formatDateRange_TIME 167
ICU4C + JNI
RelativeDateTimeFormatter_getRelativeDateTimeString 151.6
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 169.0
RelativeDateTimeFormatter_getRelativeTimeSpanString 27.8
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 27.7
ICU4J
RelativeDateTimeFormatter_getRelativeDateTimeString 366.5
RelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV 377.6
RelativeDateTimeFormatter_getRelativeTimeSpanString 23.2
RelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV 22.9
Bug: 20127691
Change-Id: I1ebc08fd9c974743026ae1e6c848fb4de8aa0e48
|
|\ \
| |/
| |
| |
| |
| |
| | |
for ICU and libcore"
* commit '8426170b2440ce9d9857f8b63e5de5f77d7ee393':
Changes to enable timezone data overrides for ICU and libcore
|
| |\ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 19941636
Change-Id: Id587be99f645978c2e1067c9f8eef26d6d63ec27
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit 'ff1e2b45293d883fbff3d58f1d88746fbe126836':
Implement BreakIterator in terms of icu4j.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note that we need manual range checks in our wrapper because
the ICU4J implementation will clamp offsets to either end of
the input text.
benchmark results :
text benchmark us linear runtime
LIPSUM BreakIterator 326.02 =====
LIPSUM IcuBreakIterator 333.47 ======
LONGPARA BreakIterator 227.67 ====
LONGPARA IcuBreakIterator 228.68 ====
GERMAN BreakIterator 79.09 =
GERMAN IcuBreakIterator 81.30 =
THAI BreakIterator 1654.11 ==============================
THAI IcuBreakIterator 1646.75 =============================
THAI2 BreakIterator 44.28 =
THAI2 IcuBreakIterator 42.67 =
TABS BreakIterator 12.79 =
TABS IcuBreakIterator 12.53 =
ACCENT BreakIterator 16.26 =
ACCENT IcuBreakIterator 15.37 =
EMOJI BreakIterator 17.71 =
EMOJI IcuBreakIterator 18.34 =
SPACES BreakIterator 16.86 =
SPACES IcuBreakIterator 15.78 =
EMPTY BreakIterator 9.22 =
EMPTY IcuBreakIterator 9.96 =
NEWLINE BreakIterator 11.08 =
NEWLINE IcuBreakIterator 9.96 =
BIDI BreakIterator 19.54 =
BIDI IcuBreakIterator 18.96 =
Change-Id: I72023dd605da8e33974aa3181506f0d9c7bc180e
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '1b29afea69c76a7ed73c60d35d84b515097b25a0':
Add a test to confirm that TZ data is in sync
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Android has two sources of timezone data: one used by
bionic / libcore code, and one used by ICU.
When ICU4J is added more tests can be added to confirm
that ICU4C and ICU4J agree on time zone and other sources
of data like CLDR and the ICU version itself.
Bug: 19941636
Change-Id: I614392a876e19a55e362489f142eec71beaf5547
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit 'd92eaa4a580d86051f8174b1992c40f55df6e56a':
Add libcore.net.NetworkSecurityPolicy.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This hidden libcore API is to be used by bundled network stacks to
determine whether cleartext network traffic is permitted. These stacks
cannot directly use the public Android framework API
android.security.NetworkSecurityPolicy because the framework package
typically compile-time depends on the packages offering these bundled
network stacks.
As an example, this CL makes java.util.logging.SocketHandler and
platform-provided URLConnection instances for the FTP protocol honor
this new flag.
To avoid duplication, the intention is that framework's
android.security.NetworkSecurityPolicy implementaion will switch to
this new libcore API to store/retrive the state of framework's
NetworkSecurityPolicy class.
Bug: 19215516
Change-Id: I78e348458975d69c52918582a43db25df87e2a15
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* commit 'fc23db65f41c887963ce754e3a2cd350d5dad8e8':
Fix for ftp:// invalid urls with ProxySelector
|
| |\ \ \
| | |/ /
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are currently no tests for FtpURLConnection. Future
commits are planned that add tests that are based on the
MockFTPServer open-source project.
Thanks to pk.samson@ for the report.
Bug: https://code.google.com/p/android/issues/detail?id=160725
Change-Id: I54fc2d5825f4e1b9681d537dd2c92b90659be5b5
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
absolute date string"
* commit '94cc3fafd50df1d5ab0fdb141db2e260efdc7831':
Fix the year display when formatting absolute date string
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In getRelativeDateTimeString(), when formatting the absolute date string
with formatDateRange(), we need to explicitly specify the option to
show / hide the year display based on the given arguments. Otherwise it
would determine based on the current time and may gave wrong results.
In getRelativeTimeSpanString(), it follows the same logic when user
doesn't supply any option.
Bug: 19822016
Change-Id: I0d4f01b7d15e0b8ea44f21b77309b1fc370b365b
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For backwards compatibility with the apache code this is replacing.
Several callers compare encoded strings for byte equality.
bug: 19731588
Change-Id: I2e96abcabd69ba6d48d341eafe1f8075fff880ee
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Only the byte[] version for now. The ByteBuffer version will be
added later.
Bug: 19704592
Change-Id: I35c5f305b5828ff3315e42aae72aa4b01839e2fc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Additionally:
- support bind and connect calls with SocketAddresses
- getsockname and getpeername can return a NetlinkSocketAddress
Developed in conjunction with:
https://android-review.googlesource.com/135490
Bug: 18581716
Change-Id: I760a06cdb9bdb26c734fb02cf668a94de982e2b6
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are several open questions that I hope to resolve in future
changes :
- Our heuristics for detecting whether a zip outputstream should
switch over to zip64 or not are imprecise.
- Also, given that we now officially support zip64, we have to assume
new entries whose size is unknown need the zip64 header / footer.
This will make output files slightly larger and less compatible with
older tools. If we don't do this, we'll have to go back and rewrite &
compact parts of the stream we'd already flushed, which isn't always
possible. The other option is to assume zip32 for streams of unknown
length and throw if more than 4G of data is written to them.
Change-Id: Ibb4a97b5f83fd3ab850d7c407ecfda663968a6b9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
fcntlLong works too, but only because of the syscall conventions
happen to place the lower 32 bits of our jlong in the right register.
This change also gets rid of fcntlLong because there aren't any
documented fcntl calls that take a 64 bit integer argument.
Change-Id: I8d187d5b906195fc663675a07a5f116dcd210d16
|
|
|
|
|
|
| |
Hidden for now, for use from the frameworks.
Change-Id: I30d95b28ecbc422aaa5bf28fb2f288c3ca026493
|
|
|
|
|
|
|
|
|
|
| |
Rename isSocket to isSocket$ since it's public @hide.
Make isSocket$ final, even though the class is final, so it's obvious from
grep that you can't accidentally override this. (The other public @hide
methods in this class were already explicitly marked final.)
Change-Id: I90563ca567857fa7d38b7ee8006f8abe6ca2db9a
|
|
|
|
|
|
|
| |
Tiny change after commit 2237a9d0ea59928f8852c9f599bdd9a6930e727d
to compare a long with a long.
Change-Id: Iaba2d7246295f3f23c760fe72195136208a95933
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 18719692
Change-Id: I91a943369bc3b331e7e06e758f729b008c3c041c
|
|/
|
|
|
| |
Bug: 18788282
Change-Id: I9e28278eae3812387440dbfce196a20c32e24b30
|
|\ |
|