Update Locale to OpenJDK8u60 (part 1/2)
The additions for the new API for RFC 4647 Matching of Language Tags is left to a potential future part 2/2. This CL updates all other parts of Locale. Specifically: * added new hasExtensions() (also used internally by the class), stripExtensions() plus corresponding tests * minor tweaks (formatting, @return sections, default DISPLAY locale clarification, ...) to documentation. * initialize defaultLocale eagerly during <clinit> rather than lazily * add Android-changed comments to several existing sections that were missing them * introduce field languageTag to cache result of toLanguageTag() * Note: There are four methods whose implementation on Android is based on ICU. Upstream's implementations internally use a helper method getDisplayString() that uses LocalServiceProviderPool; that method has changed upstream to no longer pass a pool, which means that the pool will not be used as a fallback for localizing strings. I think the Android implementation doesn't need to change but please double check. Bug: 29935305 Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a Change-Id: If595cf8b69021f78b76a9a223a0f0d906e74cdc8
Loading
Please sign in to comment