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

Commit 2321c41b authored by Dan Zivkovic's avatar Dan Zivkovic
Browse files

Check boxes are replaced by switches in KitKat.

Make the code work for both widgets by using the TwoStatePreference interface.

Bug 19596067.

Change-Id: I8352361dcf74b54136b6177de9aac3eb2942a4c0
parent 5455179b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Build;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.TwoStatePreference;

import com.android.inputmethod.dictionarypack.DictionarySettingsActivity;
import com.android.inputmethod.latin.R;
@@ -88,8 +88,8 @@ public final class CorrectionSettingsFragment extends SubScreenFragment {
    }

    private void ensureConsistencyOfAutoCorrectionSettings() {
        final CheckBoxPreference autoCorrectionPref = (CheckBoxPreference) findPreference(
                Settings.PREF_AUTO_CORRECTION);
        final TwoStatePreference autoCorrectionPref = (TwoStatePreference)
                findPreference(Settings.PREF_AUTO_CORRECTION);
        if (!autoCorrectionPref.isChecked()) {
            setPreferenceEnabled(Settings.PREF_BIGRAM_PREDICTIONS, false);
        }