Remove language settings from preference activity
Bug: 3268561 Change-Id: Ia910f0a090dc66c7dd9176999930d8cb763203b0main
parent
9ecad8c2e8
commit
7f1d3fa5d8
|
@ -21,6 +21,7 @@
|
||||||
<!-- Whether or not Popup on key press is enabled by default -->
|
<!-- Whether or not Popup on key press is enabled by default -->
|
||||||
<bool name="default_popup_preview">false</bool>
|
<bool name="default_popup_preview">false</bool>
|
||||||
<bool name="config_enable_show_settings_key_option">false</bool>
|
<bool name="config_enable_show_settings_key_option">false</bool>
|
||||||
|
<bool name="config_enable_show_subtype_settings">false</bool>
|
||||||
<bool name="config_enable_show_voice_key_option">false</bool>
|
<bool name="config_enable_show_voice_key_option">false</bool>
|
||||||
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
|
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<bool name="default_recorrection_enabled">true</bool>
|
<bool name="default_recorrection_enabled">true</bool>
|
||||||
<bool name="config_long_press_comma_for_settings_enabled">true</bool>
|
<bool name="config_long_press_comma_for_settings_enabled">true</bool>
|
||||||
<bool name="config_enable_show_settings_key_option">true</bool>
|
<bool name="config_enable_show_settings_key_option">true</bool>
|
||||||
|
<bool name="config_enable_show_subtype_settings">true</bool>
|
||||||
<bool name="config_enable_show_voice_key_option">true</bool>
|
<bool name="config_enable_show_voice_key_option">true</bool>
|
||||||
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
|
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
<!-- TODO: Filter subtypes by IME in SubtypeEnabler -->
|
<!-- TODO: Filter subtypes by IME in SubtypeEnabler -->
|
||||||
<!-- TODO: Maybe use this only for phone? -->
|
<!-- TODO: Maybe use this only for phone? -->
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
|
android:key="subtype_settings"
|
||||||
android:title="@string/language_selection_title"
|
android:title="@string/language_selection_title"
|
||||||
android:summary="@string/language_selection_summary">
|
android:summary="@string/language_selection_summary">
|
||||||
<intent
|
<intent
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class Settings extends PreferenceActivity
|
||||||
public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode";
|
public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode";
|
||||||
public static final String PREF_INPUT_LANGUAGE = "input_language";
|
public static final String PREF_INPUT_LANGUAGE = "input_language";
|
||||||
public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
|
public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
|
||||||
|
public static final String PREF_SUBTYPES = "subtype_settings";
|
||||||
|
|
||||||
public static final String PREF_PREDICTION_SETTINGS_KEY = "prediction_settings";
|
public static final String PREF_PREDICTION_SETTINGS_KEY = "prediction_settings";
|
||||||
public static final String PREF_QUICK_FIXES = "quick_fixes";
|
public static final String PREF_QUICK_FIXES = "quick_fixes";
|
||||||
|
@ -119,6 +120,12 @@ public class Settings extends PreferenceActivity
|
||||||
getPreferenceScreen().removePreference(
|
getPreferenceScreen().removePreference(
|
||||||
getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
|
getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final boolean showSubtypeSettings = getResources().getBoolean(
|
||||||
|
R.bool.config_enable_show_subtype_settings);
|
||||||
|
if (!showSubtypeSettings) {
|
||||||
|
getPreferenceScreen().removePreference(findPreference(PREF_SUBTYPES));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue