| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Allows us to query the DB without having to clone an object or
an entire strings array.
bug: 19106773
bug: 19987403
Change-Id: I66d466e414972b02a75bcfe68263e74de8b9a768
|
|
|
|
|
|
|
|
| |
For backwards compatibility with the apache code this is replacing.
Several callers compare encoded strings for byte equality.
bug: 19731588
Change-Id: I2e96abcabd69ba6d48d341eafe1f8075fff880ee
|
|
|
|
|
|
|
|
|
| |
Frameworks callers either roll their own or use an internal apache
class. Given that apache is going away, we need to provide them with
an alternative.
bug: 18027885
Change-Id: Iec01cba9f3d2027828457c0b450eac0dd08fcaf6
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When executed under the CTS environment some of the tests in
ZoneInfoDBTest assumed:
1) The device was booted with all tzinfo files present and that
they don't change (i.e. so the runtime's static TimeZone
singleton reflects the contents of the file system at the
time the test is executed).
2) The number of timezone IDs in /data/misc/zoneinfo/tzdata,
/system/usr/share/zoneinfo/tzdata are the same (if
assumption 1 holds).
This change modifies the tests to only use the (unchanging)
/system/usr/share/zoneinfo/tzdata file and avoid use of the
TimeZone class.
Bug: 15382201
Change-Id: I8d3b1ea52a2147e7afaa302803c834539bd01db9
|
|
|
|
|
| |
Bug: 11513357
Change-Id: Ib8a6c2574eb2aef85c4224f0c640ab9b883713c5
|
|
|
|
|
|
|
|
|
| |
The tests were assuming that the zygote was always using the
/system/usr/share/zoneinfo copy, but devices that have taken a gservices tzdata
update will be using the /data/misc/zoneinfo/tzdata copy instead.
Bug: 11513357
Change-Id: Ieb5c28f91445630f6b00e18aefff0c234c223d97
|
|
|
|
|
|
| |
I'm so stupid. frameworks/base wasn't the only caller.
Change-Id: Ia0c3ce79e2f899e77a9cd1e62fca7d3b22130cf2
|
|
|
|
|
|
|
|
|
|
| |
We need to fall back to the next choice on error. Rewrite the code
to be testable and add some tests. Add an internal GMT-only
fallback in case all our sources of tzdata are bad. Also make
time zone detection on the host more useful.
Bug: 8373554
Change-Id: I9f91b844a61f07f34b268535e6d24aa0c301bf8d
|
|
|
|
| |
Change-Id: Idfaea5c474eb3cabfb8eefc5aa25a7ff0cce26ea
|
|
|
|
|
| |
Change-Id: I0ceb442801160827909ff9ab3e52771754072bda
http://b/4087759
|
|
|
|
|
| |
Change-Id: I08a5e82e123920762ad9a9c87bbe3045f17e33a9
http://b/3184897
|
|
Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
|