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

Commit b0ff2494 authored by Ankit Gupta's avatar Ankit Gupta Committed by Steve Kondik
Browse files

InputMethods: set the default value for preference

set the default value of the shared preference PREF_SHOW_SUGGESTIONS
directly from the xml file.

FEIJ-1483

Change-Id: If0e7c0411e8c26f926f16f5779c043f0675378fd
parent c05b5425
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@
        android:key="show_suggestions"
        android:summary="@string/prefs_show_suggestions_summary"
        android:title="@string/prefs_show_suggestions"
        android:defaultValue="@bool/config_show_suggestions_default"
        android:persistent="true" />
    <CheckBoxPreference
        android:key="pref_key_use_personalized_dicts"
+0 −7
Original line number Diff line number Diff line
@@ -90,13 +90,6 @@ public final class CorrectionSettingsFragment extends SubScreenFragment

        mUseContactsPreference = (SwitchPreference) findPreference(Settings.PREF_KEY_USE_CONTACTS_DICT);
        turnOffUseContactsIfNoPermission();

        final SwitchPreference suggestionsEnabledPreference = (SwitchPreference) findPreference(
                Settings.PREF_SHOW_SUGGESTIONS);
        if (suggestionsEnabledPreference != null) {
            suggestionsEnabledPreference.setChecked(
                    Settings.getInstance().getCurrent().isSuggestionsEnabledPerUserSettings());
        }
    }

    private void overwriteUserDictionaryPreference(final Preference userDictionaryPreference) {