Merge "Remove manual config item controlling to show input language settings"

main
Tadashi G. Takaoka 2011-05-20 03:02:14 -07:00 committed by Android (Google) Code Review
commit 20e16475e6
4 changed files with 9 additions and 17 deletions

View File

@ -20,7 +20,6 @@
<resources> <resources>
<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>
<!-- TODO: This configuration value is temporary set true to check popup preview behavior. --> <!-- TODO: This configuration value is temporary set true to check popup preview behavior. -->
<bool name="config_enable_show_popup_on_keypress_option">true</bool> <bool name="config_enable_show_popup_on_keypress_option">true</bool>

View File

@ -21,7 +21,6 @@
<resources> <resources>
<bool name="config_swipeDisambiguation">true</bool> <bool name="config_swipeDisambiguation">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_enable_show_popup_on_keypress_option">true</bool> <bool name="config_enable_show_popup_on_keypress_option">true</bool>
<bool name="config_enable_show_recorrection_option">true</bool> <bool name="config_enable_show_recorrection_option">true</bool>

View File

@ -1014,14 +1014,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} }
private void onSettingsKeyPressed() { private void onSettingsKeyPressed() {
if (!isShowingOptionDialog()) { if (isShowingOptionDialog())
if (!mSettingsValues.mEnableShowSubtypeSettings) { return;
showSubtypeSelectorAndSettings(); if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED) {
} else if (Utils.hasMultipleEnabledIMEsOrSubtypes(mImm)) { showSubtypeSelectorAndSettings();
showOptionsMenu(); } else if (Utils.hasMultipleEnabledIMEsOrSubtypes(mImm)) {
} else { showOptionsMenu();
launchSettings(); } else {
} launchSettings();
} }
} }

View File

@ -87,7 +87,6 @@ public class Settings extends PreferenceActivity
public static class Values { public static class Values {
// From resources: // From resources:
public final boolean mEnableShowSubtypeSettings;
public final boolean mSwipeDownDismissKeyboardEnabled; public final boolean mSwipeDownDismissKeyboardEnabled;
public final int mDelayBeforeFadeoutLanguageOnSpacebar; public final int mDelayBeforeFadeoutLanguageOnSpacebar;
public final int mDelayUpdateSuggestions; public final int mDelayUpdateSuggestions;
@ -128,8 +127,6 @@ public class Settings extends PreferenceActivity
} }
// Get the resources // Get the resources
mEnableShowSubtypeSettings = res.getBoolean(
R.bool.config_enable_show_subtype_settings);
mSwipeDownDismissKeyboardEnabled = res.getBoolean( mSwipeDownDismissKeyboardEnabled = res.getBoolean(
R.bool.config_swipe_down_dismiss_keyboard_enabled); R.bool.config_swipe_down_dismiss_keyboard_enabled);
mDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger( mDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger(
@ -371,10 +368,7 @@ public class Settings extends PreferenceActivity
generalSettings.removePreference(findPreference(PREF_VIBRATE_ON)); generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
} }
final boolean showSubtypeSettings = res.getBoolean( if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED) {
R.bool.config_enable_show_subtype_settings);
if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED
&& !showSubtypeSettings) {
generalSettings.removePreference(findPreference(PREF_SUBTYPES)); generalSettings.removePreference(findPreference(PREF_SUBTYPES));
} }