Loading core/java/com/android/internal/inputmethod/InputMethodUtils.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -377,9 +377,6 @@ public class InputMethodUtils { } } // TODO: Use {@link Locale#toLanguageTag()} and {@link Locale#forLanguageTag(languageTag)}. // TODO: Use {@link Locale#toLanguageTag()} and {@link Locale#forLanguageTag(languageTag)}. String[] localeParams = localeStr.split("_", 3); String[] localeParams = localeStr.split("_", 3); // The length of localeStr is guaranteed to always return a 1 <= value <= 3 // because localeStr is not empty. if (localeParams.length == 1) { if (localeParams.length >= 1 && "tl".equals(localeParams[0])) { if (localeParams.length >= 1 && "tl".equals(localeParams[0])) { // Convert a locale whose language is "tl" to one whose language is "fil". // Convert a locale whose language is "tl" to one whose language is "fil". // For example, "tl_PH" will get converted to "fil_PH". // For example, "tl_PH" will get converted to "fil_PH". Loading @@ -388,6 +385,9 @@ public class InputMethodUtils { // On Lollipop and above, the current three letter version must be used. // On Lollipop and above, the current three letter version must be used. localeParams[0] = "fil"; localeParams[0] = "fil"; } } // The length of localeStr is guaranteed to always return a 1 <= value <= 3 // because localeStr is not empty. if (localeParams.length == 1) { return new Locale(localeParams[0]); return new Locale(localeParams[0]); } else if (localeParams.length == 2) { } else if (localeParams.length == 2) { return new Locale(localeParams[0], localeParams[1]); return new Locale(localeParams[0], localeParams[1]); Loading Loading
core/java/com/android/internal/inputmethod/InputMethodUtils.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -377,9 +377,6 @@ public class InputMethodUtils { } } // TODO: Use {@link Locale#toLanguageTag()} and {@link Locale#forLanguageTag(languageTag)}. // TODO: Use {@link Locale#toLanguageTag()} and {@link Locale#forLanguageTag(languageTag)}. String[] localeParams = localeStr.split("_", 3); String[] localeParams = localeStr.split("_", 3); // The length of localeStr is guaranteed to always return a 1 <= value <= 3 // because localeStr is not empty. if (localeParams.length == 1) { if (localeParams.length >= 1 && "tl".equals(localeParams[0])) { if (localeParams.length >= 1 && "tl".equals(localeParams[0])) { // Convert a locale whose language is "tl" to one whose language is "fil". // Convert a locale whose language is "tl" to one whose language is "fil". // For example, "tl_PH" will get converted to "fil_PH". // For example, "tl_PH" will get converted to "fil_PH". Loading @@ -388,6 +385,9 @@ public class InputMethodUtils { // On Lollipop and above, the current three letter version must be used. // On Lollipop and above, the current three letter version must be used. localeParams[0] = "fil"; localeParams[0] = "fil"; } } // The length of localeStr is guaranteed to always return a 1 <= value <= 3 // because localeStr is not empty. if (localeParams.length == 1) { return new Locale(localeParams[0]); return new Locale(localeParams[0]); } else if (localeParams.length == 2) { } else if (localeParams.length == 2) { return new Locale(localeParams[0], localeParams[1]); return new Locale(localeParams[0], localeParams[1]); Loading