| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
ISO 8601 recommends the numbers in the time zone string should be non-localized
numbers. Though implemented version returns localized numbers depends on the
default locale.
This CL removes localization from formiting the time zone ID.
Change-Id: If828bcebb13b8509f5caf4dd201a4dbcd7defc38
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| | |
No need for native code here.
Change-Id: Iaeb0369b5638a6681fd94fd999641801719aaea2
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We must call through to Object.clone to ensure that we
always return an object of the right type. If not, subclasses
will have to override clone() instead of calling through to
super.clone().
bug: 19748843
Change-Id: Ie2177bbc05c62281f48780e521ad66de3612561e
|
| |
| |
| |
| |
| | |
bug: 19749094
Change-Id: Id1d7bcf4abebb423fd3bbb7c8f379bf9e6234969
|
|/
|
|
|
|
|
|
|
| |
The test got broken by recenly added AndroidKeyStore-backed
implementation of Mac which cannot be initialized with a
SecretKeySpec.
Bug: 20222007
Change-Id: Id4941347acd092b435d6797c5ee2477fae8cd516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Add a test to verify that we error out when the manifest
declares a file which isn't present in the jar.
Bug: 1162500
Change-Id: I3c6814c500d218036a5c0515e9f4f93e3f7a63d5
|
|
|
|
|
|
|
| |
Ensure all manifest files are present in the jar.
Bug: 1162500
Change-Id: I36b40a34d5837b8ad4a0d13e7ea2e37ad7e51f3b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split out security.properties I/O to a separate method returning
a Reader. This method can be intercepted at compile-time and
provide a StringReader with the content of the file. A reader is
necessary as Properties interally uses a reader and requires a
Charset to translate from an input-stream.
Refactor Services provider loading to first try the boot classpath
loader instead of the system class-loader. The former is accessible
during compile-time initialization and functionally equivalent.
Bug: 19498458
Bug: 19542228
Change-Id: I853952b83ca99006907c070734f767259c975517
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a private inner class for custom-time-zone parsing. This
moves the Pattern field which cannot be compile-time initialized.
As a result, TimeZone, SimpleTimeZone & ZoneInfo can be initialized
in the boot image.
Bug: 19542228
Change-Id: I6fc8cb65975e14351a6bfc1ddfac175368efd1eb
|
|
|
|
|
|
|
| |
Move CREATION_YEAR to a static inner class.
Bug: 19542228
Change-Id: I3db699f8ad661305f5255ee730faeb21c2861dde
|
|
|
|
|
|
|
|
|
|
|
| |
This failure mode we're testing for is no longer possible because
we use ICU4J. Moreover, this seems to trip up the CTS test runner
which flags exceptions in the logs from other threads as failures.
If there's a good reason to keep this, we can always add an
UncaughtExceptionHandler that doesn't log to all worker threads.
Change-Id: I23eeeb01e4a9c0987e30e54a2d84cc5d4f79a6c0
|
|
|
|
|
| |
Bug: 19941636
Change-Id: I4dbadfbfd4a8fbfeb3d580c073061710fd521fdd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was leaking resources allocated by SSLEngine's, pipes among others,
thus causing subsequent tests to fail with "too many open files"
errors. In OpenSSLEngineImpl, the resources are freed in the finalizer,
so there's no guarantee that resources as pipes will ever be freed
unless the engines are explicitly closed.
Change-Id: Ide90808a64278486a19bcdfcba628f623c62afc9
|
| |
| |
| |
| |
| |
| | |
Updates to documentation around lineSeparator.
Change-Id: I0b646c06ac85303e572e38738889a8247eef37a0
|
| |
| |
| |
| |
| |
| | |
Based on a discussion with the icu team.
Change-Id: I47a6b260a9348debd65282794996f7976b8bc008
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 19941636
Change-Id: Id587be99f645978c2e1067c9f8eef26d6d63ec27
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were peeking into the wrong field for the extra length.
bug: https://code.google.com/p/android/issues/detail?id=159340
Change-Id: Ib7ed400e3e119b1d6c95be49d25812c5c7f366b9
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This makes it possible for platform code to obtain the current SPI
implementation of Cipher, Signature, Mac, and KeyAgreement instances.
The current use case is to access additional information about these
crypto operations when they are backed by Android KeyStore.
NOTE: The getSpi API will not and cannot become public framework API.
Bug: 18088752
Change-Id: If575726d288eebc73ffa3209c316fad071a087fd
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is the same mistake as public bug 159340, we were peeking
in the wrong buffer for the CRC.
Note that this is different from the member CRC, the latter is
the CRC of the actual data (not the header) and is mandatory.
Change-Id: I98d49bdd9d5ea93fe982783c8077531764ee5347
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change was breaking tools like dexmaker that would write
zipfiles to disk so that the runtime could read them.
We don't want to go back and amend the local file header, so
we just throw an IOException if somebody writes more than 4GB
of data to an entry that doesn't have a declared size. If the
entry has a declared size > 4GB, we can write the zip64 header
in advance.
bug: 19574093
Change-Id: I771e821996efd3ef4c3de5e02f5a0062e62f9244
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For the boot class loader (loader == null) loadLibrary tries
to find the the full path of the library using java.library.path.
When actually loading the library, we need to use the same
java.library.path property in case the library has dependencies.
Change-Id: I2404d72f5c65c6a5ecfedc1efe879cfc9cef55ad
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | |_|/
| |/| |
| | | |
| | | | |
Change-Id: I4dc6c40be400e298921c57f5c6d6c413edd70f68
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
AndroidKeyStore provider's KeyPairGenerator and KeyGenerator instances
require AndroidKeyStore-specific initialization parameters which are
represnted by Android framework classes and are thus not accessible
from libcore tests.
This CL fixes KeyGeneratorTest to skip AndroidKeyStore provider to
follow the behavior of KeyPairGeneratorTest.
Change-Id: I61d176a7bc22a676d06d32f49aba37aebebe9c76
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds CTS tests that assert that platform-provided URLConnection
instances that use cleartext HTTP honor the cleartext traffic policy
from NetworkSecurityPolicy.
Bug: 19215516
Change-Id: I79f5fce5e00434e96f4325c1aae65a573f10dcdd
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I7a5c8095e98f1449fb4efc98061c488fd0b573e2
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The move from to gcc 4.8 to gcc 4.9 for arm32 introduced a bug in this
code. The original code is trying to out smart the compiler by arch, but
we got caught. Running benchmarks, the amount of time we save by doing this
is in the nanosecond range, so just let the compiler figure things out on
it's own.
It turns out for aarch64, x86, x86_64, two of the functions produce exactly
the same code. For swapLongs, x86/x86_64 produces slightly different code
but is about the same performance.
For arm32, letting the compiler optimize also leads to about the same
performance.
Adding unit tests and benchmark code for these.
Bug: 19692084
Change-Id: I858eb3147ef1e9e2c1894ddb226cdddcc0baf933
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\ \ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
getDexPath is used by Runtime.nativeLoad to
open libraries directly from apk. Given that
libraries are not compressed and are page-aligned.
Bug: 8076853
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
|