065d7764ac1dfe74ee94d17ca6c810de37b57d3e |
|
11-Aug-2014 |
Elliott Hughes <enh@google.com> |
Fix TimeZone.getAvailableIDs(int). This was broken by the removal of the pre-computed raw offsets from the tzdata file. I think that's still the direction we want to go (with us hopefully using more of icu4j at some point, and eventually relying solely on the icu time zone data), so this patch adds code to lazily evaluate all the offsets by instantiating all the time zones. Bug: 16947622 Change-Id: I6d1dfe5ee6c99338f9807c3af5b6f04539c256c3
|
b7d5826277766003e36bb8e82a0c09020fc1c823 |
|
17-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Support for a android.text.format.Time implemented entirely in Java (cherry picked from commit 0785676ad838b48512fde6bef58c380daf11994f) Bug: 15765976 Change-Id: Ic1d32743583539fa03924d1c0c122663f37ac3ac
|
0785676ad838b48512fde6bef58c380daf11994f |
|
17-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Support for a android.text.format.Time implemented entirely in Java Bug: 15765976 Change-Id: Ic743168a54ff96e5403a9c73c27eeb7d482a01dc
|
60226561d5af59bc47ee70a4988633050e6fc62e |
|
17-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Add a cache for ZoneInfo objects in Java 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. LMP cherry-pick notes: This is a cherry-pick of the final patch. In master, an original patch was reverted and then the revert was reverted with an added fix. The comment above is from the original commit. The fixed version included: Contains a fix for when the timezone ID is not found. This includes a new test. (cherry picked from d3d39ab8df5c4f6ae663613dc3617ba300282315) Change-Id: I4c145942b6603e0e62badfd052b5716fd68769d2
|
d3d39ab8df5c4f6ae663613dc3617ba300282315 |
|
17-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Revert "Revert "Add a cache for ZoneInfo objects in Java"" This reverts commit 01b6a878d10ee68db87c3d85d137e81a5257a78a. Contains a fix for when the timezone ID is not found. This includes a new test. Change-Id: I2e5e669782ea6caf4e97153ed6b63ca6ee4ef50d
|
01b6a878d10ee68db87c3d85d137e81a5257a78a |
|
17-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Revert "Add a cache for ZoneInfo objects in Java" This reverts commit a6e8689807f5a8bb9470ce7c26a47455d2d0608d. Change-Id: I17a0262d169db3418f2f8888195381f778975dc4
|
a6e8689807f5a8bb9470ce7c26a47455d2d0608d |
|
16-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Add a cache for ZoneInfo objects in Java 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
|
5d930cadc8f62aee5f18e7921296fe66a54f18ab |
|
24-Apr-2014 |
Elliott Hughes <enh@google.com> |
Groundwork towards making the Libcore.os functionality public. Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
|
2a6f23ff8690ac2f025588a360547ce96cde0943 |
|
29-Jun-2013 |
Elliott Hughes <enh@google.com> |
Add java.nio.charsets.StandardCharsets. Bug: 3484927 Change-Id: I5820267491b850b8fcc696fa48962710de123009
|
eef73ccb5e02b939ae8f348094c64f50955870a5 |
|
26-Apr-2013 |
Elliott Hughes <enh@google.com> |
Remove the now-unused ZoneInfoDB.getVersion API. Change-Id: I05aff6c07e9baca679b8b7759f4f0108067d06e6
|
995caee51334a4f1a1429e29680ea079c900c37a |
|
25-Apr-2013 |
Elliott Hughes <enh@google.com> |
Cope with a corrupt tzdata update. 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
|
dad6760aedf4c6b29b47dea6352d88fc3df9b2e5 |
|
15-Mar-2013 |
Elliott Hughes <enh@google.com> |
Return Olson ids from TimeZoneNames.forLocale in zone.tab order. Bug: 8391426 Change-Id: I7b1335a8d8e0c804d68c85b18b1c4891ec269c1d
|
8d5562828a5dda6ae0fbe5ba0355a95e650e3d2e |
|
22-Oct-2012 |
Elliott Hughes <enh@google.com> |
Support zone.tab in libcore, and remove the file format version. Bug: 7012465 Change-Id: I2ac580094928806abcf7c6f5f0e6ee950a954135
|
4c0cbc2cf60df843387233801784ae43c2cd747c |
|
20-Oct-2012 |
Elliott Hughes <enh@google.com> |
Make libcore look in /data/misc for tzdata updates. Bug: 7012465 Change-Id: Ia452f9c4482d0a75073e6a174f38114525984f15
|
53d000ca7ea62d0e36c9ba7be8c54c4777cabae6 |
|
19-Oct-2012 |
Elliott Hughes <enh@google.com> |
Make it possible to share libcore.util.ZoneInfo with bionic. The code that generates the single big file from the directory of zoneinfo files needs to be able to get the raw offset for each zone, so we can implement TimeZone.getAvailableIDs(int) cheaply. Bug: 7012465 Change-Id: Icc8355c086dd8e62589c2930fb7f892feea5a217
|
6cbefca623f55004ba65f11577fc25f92f6297dc |
|
17-Oct-2012 |
Elliott Hughes <enh@google.com> |
Pull libcore's time zone data from the new single 'tzdata' file. Bug: 7012465 Change-Id: I5ce1a372755e31f8882fbfc2ea2b582fec1858b3
|
78c3de051d68b703af480778c100ca335690b250 |
|
30-Jul-2012 |
Elliott Hughes <enh@google.com> |
Fix TimeZone's handling of Australia/Lord_Howe. Australia/Lord_Howe has a half hour difference between standard and daylight time, rather than the usual hour. Our ZoneInfo implementation ignored this. Fix that oversight, make SimpleDateFormat actually use this information, and prevent TimeZone.getTimeZone("GMT") and TimeZone.getTimeZone("UTC") from being quite as expensive as they accidentally were. Longer term I think we should probably remove all uses of getDSTSavings from libcore in favor of TimeZone.getOffset, but this is probably a useful step forwards anyway. It fixes Australia/Lord_Howe in the meantime and it means that anyone else who's using getDSTSavings won't be bitten (even if they too really ought to be using TimeZone.getOffset). Bug: 4723412 Bug: http://code.google.com/p/android/issues/detail?id=24684 Change-Id: I5d50afecbe1453157e9c8f0b88305a258a3ba2e0
|
9b510df35b57946d843ffc34cf23fdcfc84c5220 |
|
28-May-2011 |
Elliott Hughes <enh@google.com> |
Make ErrnoException a checked exception. Bug: 4486011 Change-Id: I1877ce593d441653f75ab14884aa2d85f52652ad
|
7e25eff38a191d9c19e45093f4fde5102fb09d78 |
|
19-Mar-2011 |
Elliott Hughes <enh@google.com> |
Add mmap(2), msync(2), and munmap(2). Bug: 3107501 Change-Id: I6a7c4147ec27bab9ded280476bad1157ce03fab8
|
244449b9ccd108197d1c117edda99cd93a891d49 |
|
23-Feb-2011 |
Elliott Hughes <enh@google.com> |
Fix a comment and remove some duplication. Change-Id: I67bb9f1c71c774e04698a3e489bd48e9b27b2b64
|
6d82ce5d35a5e84aedf08528fd98b849f3f565a6 |
|
15-Feb-2011 |
Elliott Hughes <enh@google.com> |
Move ZoneInfo and ZoneInfoDB into libcore.util. Change-Id: I91385512ec27aa2aebdc163ae204e542efa58f21
|