Fix Japanese Chronology.
The JapaneseChronology class depends on the ImperialJapaneseCalendar being returned by Calendard.getInstance(). Since Android always returns a GregorianCalendar from that class, the tests will fail. This fixes the problem by importing the JapaneseImperialCalendar class from the OpenJDK (with minor tweaks to remove mentions of the ZoneInfo class) and adapting the relevant classes to use a new explicit method on Calendar to request such a calendar instance. Also apply update LocaleGregorianCalendar to jdk8u60 which fixes an off-by-one error in calculations related to eras. Added ChronologyDisplayNameTest to ensure future Chronologies return sane values for their display name and their eras display names. Bug: 28832222 Test: artrun testng-time.xml Test: run cts -m CtsLibcoreTestCases Change-Id: I3eb5d4509ad03ee3d736c7926c605f378b56d0b2
Loading
Please sign in to comment