Make sure to compare subtype language with system language.
This CL addresses a regression introduced by a recent CL [1] that non-keyboard subtypes are no longer implicitly enabled based on the system language (a.k.a. "use system language" in the subtype enabler) due to a type mismatch in comparison. Here is the original logic: if (language.equals(systemLanguage) && systemLocale.startsWith(locale)) And here is the logic replaced by [1]: if (locale != null && locale.equals(systemLanguage)) { The new logic is simply broken, because locale is a Locale object while systemLanguage is a String object. It never matches. With this CL we will compare the system language with the locale language again, with several test cases that should have been included in [1], as a temporary solution until we start relying on LocaleUtils#filterByLanguage() for non-keyboard subtypes. [1]: Iaf179d60c12b9a98b4f097e2449471c4184e049b e985c240 Bug: 27560993 Change-Id: If2d1710174853180465832e6ecbbb91235b76210
Loading
Please register or sign in to comment