3cbfb6e3a3d8c50b6512df250b24dbfffbf6d3a7 |
|
30-Mar-2017 |
Neil Fuller <nfuller@google.com> |
Addition of new time zone lookup code Introduction of libcore.util.TimeZoneFinder for resolving time zones by country / by country + offset information. This code is intended to be a work-a-like replacement for code currently residing in android.util.TimeUtils and using time_zones_by_country.xml in the plaform. android.util.TimeUtils and com.android.internal.telephony.ServiceStateTracker will be switched over to using it in a follow up change. At present, the algorithm should return the same logical results as the code it is intended to replace. A notable difference is that it uses ICU's TimeZone class instead of java.util.TimeZone because it has more convenient methods and the ability to freeze timezones. More care has been taken to return immutable data structures than the code it replaces. This change also changes the TimeZoneDistroInstaller and associated classes / tests to be aware of and require the new file. Bug: 25338903 Test: vogar luni/src/test/java/libcore/util/TimeZoneFinderTest.java Test: CTS: run cts -m CtsLibcoreTestCases -t libcore.tzdata.shared2 Test: CTS: run cts -m CtsLibcoreTestCases -t libcore.tzdata.update2 Test: CTS: run cts -m CtsLibcoreTestCases -t libcore.util.TimeZoneFinderTest Test: Manual testing after install using prepareTzDataUpdates.sh / update test app and reboot (cherry picked from commit 085fbffe1a9fd2d53bc1959a189b0289302c67b3) Change-Id: I6541b84d0e6e289cb2495e5ae045fd0356145d47
|