Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5563dc3a authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Show all languages if user enables multiple subtypes

Bug: 8976598
Change-Id: I1c3c1ede1235f696eafb3a68ec5c29479768dd0f
parent 665e4ecc
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -107,13 +107,19 @@ public class UserDictionaryList extends PreferenceFragment {
    protected void createUserDictSettings(PreferenceGroup userDictGroup) {
        final Activity activity = getActivity();
        userDictGroup.removeAll();
        final TreeSet<String> localeList =
        final TreeSet<String> localeSet =
                UserDictionaryList.getUserDictionaryLocalesSet(activity);

        if (localeList.isEmpty()) {
        if (localeSet.size() > 1) {
            // Have an "All languages" entry in the languages list if there are two or more active
            // languages
            localeSet.add("");
        }

        if (localeSet.isEmpty()) {
            userDictGroup.addPreference(createUserDictionaryPreference(null, activity));
        } else {
            for (String locale : localeList) {
            for (String locale : localeSet) {
                userDictGroup.addPreference(createUserDictionaryPreference(locale, activity));
            }
        }