getDisplayLanguage
420 public String getDisplayLanguage(Locale locale) { cachedToStringResult ="ko_KR" countryCode ="KR" languageCode ="ko" varientCode ="" 421 if (languageCode.isEmpty()) { 422 return ""; 423 } 424 425 // http://b/8049507 --- frameworks/base should use fil_PH instead of tl_PH. 426 // Until then, we're stuck covering their tracks, making it look like they're 427 // using "fil" when they're not. 428 String localeString = toString(); localeString = "ko_KR" 429 if (languageCode.equals("tl")) { 430 localeString = toNewString("fil", countryCode, variantCode); 431 } 432 433 String result = ICU.getDisplayLanguageNative(localeString, locale.toString()); result="한국어" 434 if (result == null) { // TODO: do we need to do this, or does ICU do it for us? 435 result = ICU.getDisplayLanguageNative(localeString, Locale.getDefault().toString()); 436 } 437 return result; 438 }610 public final String toString() { 611 String result = cachedToStringResult; 612 if (result == null) { 613 result = cachedToStringResult = toNewString(languageCode, countryCode, variantCode); 614 } 615 return result; 616 }
[33] LocalePicker$LocaleInfo (id=830038249560) label "日本語" (id=830038249528) locale Locale (id=830038249216) [34] LocalePicker$LocaleInfo (id=830038249992) label "한국어" (id=830038249960) count 3 [0x3] [^C] hashCode 0 [0x0] [^@ (NUL)] offset 0 [0x0] [^@ (NUL)] value (id=830038249872) [0] 한 [\ud55c] [1] 국 [\uad6d] [2] 어 [\uc5b4] locale Locale (id=830038249648) [35] LocalePicker$LocaleInfo (id=830038250432) [36] null
value (id=830038249872)
[0] 한 [\ud55c]
[1] 국 [\uad6d]
[2] 어 [\uc5b4]
value (id=830037785552) [0] 日 [\u65e5] [1] 本 [\u672c] [2] 語 [\u8a9e]