summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-01-18 12:01:16 -0800
committer Yohei Yukawa <yukawa@google.com> 2024-01-18 12:01:16 -0800
commitc482473c24e44ac67d5a3ca4f79095e343d6d7ff (patch)
tree78a8f1619a1d2423e2bee018566f7faa66e2dd13 /libs/androidfw/FileStream.cpp
parentd62ba55c575004f62430296b088077b3f5011cc8 (diff)
Make LocaleUtils#getLanguageFromLocaleString() work again
This is a follow up CL to our previous CL [1], which aimed to remove the code duplicate without changing the behavior but ended up introducing an unexpected behavior change, which is actually caught as test failures. In short, the legacy "subtypeLocale" uses a non-standard text format, which cannot be parsed with Locale#forLanguageTag(). Note that subtypes have already accept BCP 47 LanguageTags [2], that's where Locale#forLanguageTag() should be used. Anyway, with this commit LocaleUtils#getLanguageFromLocaleString() starts working correctly again. Futher cleanups will be coming at Bug 321064051. [1]: I67ec553f8cfc21b1916a5a32783630ea43f2d407 d24bd53f88e82f64f8135289de61634aab69e93e [2]: I6db107ad2afc7709167f7c4e5d24bd589ac8bd70 868d19b93b1e20c802a001c7304f8bcac5fe5114 Bug: 303302694 Bug: 321064051 Fix: 320780830 Test: atest FrameworksServicesTests:com.android.server.inputmethod.InputMethodSubtypeSwitchingControllerTest Test: atest FrameworksServicesTests:com.android.server.inputmethod.InputMethodUtilsTest Test: atest FrameworksServicesTests:com.android.server.inputmethod.LocaleUtilsTest Change-Id: Ifdbc565455cd4ff3edf47221949e8c16f3a457c2
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions