diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Settings.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Settings.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java index d6b989073..33e9bc35f 100644 --- a/java/src/com/android/inputmethod/latin/Settings.java +++ b/java/src/com/android/inputmethod/latin/Settings.java @@ -18,8 +18,10 @@ package com.android.inputmethod.latin; import com.android.inputmethod.compat.CompatUtils; import com.android.inputmethod.compat.InputMethodManagerCompatWrapper; +import com.android.inputmethod.compat.InputMethodServiceCompatWrapper; import com.android.inputmethod.deprecated.VoiceProxy; import com.android.inputmethod.compat.VibratorCompatWrapper; +import com.android.inputmethodcommon.InputMethodSettingsActivity; import android.app.Activity; import android.app.AlertDialog; @@ -36,7 +38,6 @@ import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; -import android.preference.PreferenceActivity; import android.preference.PreferenceGroup; import android.preference.PreferenceScreen; import android.speech.SpeechRecognizer; @@ -48,7 +49,7 @@ import android.widget.TextView; import java.util.Arrays; import java.util.Locale; -public class Settings extends PreferenceActivity +public class Settings extends InputMethodSettingsActivity implements SharedPreferences.OnSharedPreferenceChangeListener, DialogInterface.OnDismissListener, OnPreferenceClickListener { private static final String TAG = "Settings"; @@ -90,7 +91,6 @@ public class Settings extends PreferenceActivity public static class Values { // From resources: - public final boolean mSwipeDownDismissKeyboardEnabled; public final int mDelayBeforeFadeoutLanguageOnSpacebar; public final int mDelayUpdateSuggestions; public final int mDelayUpdateOldSuggestions; @@ -131,8 +131,6 @@ public class Settings extends PreferenceActivity } // Get the resources - mSwipeDownDismissKeyboardEnabled = res.getBoolean( - R.bool.config_swipe_down_dismiss_keyboard_enabled); mDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger( R.integer.config_delay_before_fadeout_language_on_spacebar); mDelayUpdateSuggestions = @@ -292,7 +290,6 @@ public class Settings extends PreferenceActivity } private PreferenceScreen mInputLanguageSelection; - private CheckBoxPreference mQuickFixes; private ListPreference mVoicePreference; private ListPreference mSettingsKeyPreference; private ListPreference mShowCorrectionSuggestionsPreference; @@ -334,13 +331,14 @@ public class Settings extends PreferenceActivity @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); + setInputMethodSettingsCategoryTitle(R.string.language_selection_title); + setSubtypeEnablerTitle(R.string.select_language); final Resources res = getResources(); final Context context = getActivityInternal(); addPreferencesFromResource(R.xml.prefs); mInputLanguageSelection = (PreferenceScreen) findPreference(PREF_SUBTYPES); mInputLanguageSelection.setOnPreferenceClickListener(this); - mQuickFixes = (CheckBoxPreference) findPreference(PREF_QUICK_FIXES); mVoicePreference = (ListPreference) findPreference(PREF_VOICE_SETTINGS_KEY); mSettingsKeyPreference = (ListPreference) findPreference(PREF_SETTINGS_KEY); mShowCorrectionSuggestionsPreference = @@ -387,6 +385,10 @@ public class Settings extends PreferenceActivity generalSettings.removePreference(findPreference(PREF_VIBRATE_ON)); } + if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED) { + generalSettings.removePreference(findPreference(PREF_SUBTYPES)); + } + final boolean showPopupOption = res.getBoolean( R.bool.config_enable_show_popup_on_keypress_option); if (!showPopupOption) { |