am 45f45a4f: Cleanup : remove recorrection-related stuff.

* commit '45f45a4fdb16d0fa44b4a34b880e5fabb41c1492':
  Cleanup : remove recorrection-related stuff.
main
Jean Chalard 2011-10-03 02:31:37 -07:00 committed by Android Git Automerger
commit 35988e0858
5 changed files with 7 additions and 43 deletions

View File

@ -24,7 +24,6 @@
<bool name="config_default_show_settings_key">false</bool> <bool name="config_default_show_settings_key">false</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">false</bool>
<bool name="config_enable_bigram_suggestions_option">true</bool> <bool name="config_enable_bigram_suggestions_option">true</bool>
<bool name="config_enable_usability_study_mode_option">false</bool> <bool name="config_enable_usability_study_mode_option">false</bool>
<bool name="config_sliding_key_input_enabled">true</bool> <bool name="config_sliding_key_input_enabled">true</bool>
@ -37,7 +36,6 @@
<!-- Default value for bigram prediction: after entering a word and a space only, should we look <!-- Default value for bigram prediction: after entering a word and a space only, should we look
at input history to suggest a hopefully helpful suggestions for the next word? --> at input history to suggest a hopefully helpful suggestions for the next word? -->
<bool name="config_default_bigram_prediction">false</bool> <bool name="config_default_bigram_prediction">false</bool>
<bool name="config_default_compat_recorrection_enabled">true</bool>
<bool name="config_default_sound_enabled">false</bool> <bool name="config_default_sound_enabled">false</bool>
<bool name="config_default_vibration_enabled">true</bool> <bool name="config_default_vibration_enabled">true</bool>
<bool name="config_auto_correction_spacebar_led_enabled">true</bool> <bool name="config_auto_correction_spacebar_led_enabled">true</bool>

View File

@ -326,10 +326,6 @@
<string name="prefs_enable_log">Enable user feedback</string> <string name="prefs_enable_log">Enable user feedback</string>
<!-- Description for enabling to send user statistics to Google --> <!-- Description for enabling to send user statistics to Google -->
<string name="prefs_description_log">Help improve this input method editor by automatically sending usage statistics and crash reports to Google.</string> <string name="prefs_description_log">Help improve this input method editor by automatically sending usage statistics and crash reports to Google.</string>
<!-- Preferences item for enabling to correct suggestions by touching words you have typed [CHAR LIMIT= 35] -->
<string name="prefs_enable_recorrection">Touch to correct words</string>
<!-- The summary for the preferences item for enabling to correct suggestions by touching words you have typed [CHAR LIMIT= 100] -->
<string name="prefs_enable_recorrection_summary">Touch entered words to correct them, only when suggestions are visible</string>
<!-- Title of the item to change the keyboard theme [CHAR LIMIT=20]--> <!-- Title of the item to change the keyboard theme [CHAR LIMIT=20]-->
<string name="keyboard_layout">Keyboard theme</string> <string name="keyboard_layout">Keyboard theme</string>

View File

@ -44,12 +44,6 @@
android:title="@string/popup_on_keypress" android:title="@string/popup_on_keypress"
android:persistent="true" android:persistent="true"
android:defaultValue="@bool/config_default_popup_preview" /> android:defaultValue="@bool/config_default_popup_preview" />
<CheckBoxPreference
android:key="recorrection_enabled"
android:title="@string/prefs_enable_recorrection"
android:summary="@string/prefs_enable_recorrection_summary"
android:persistent="true"
android:defaultValue="@bool/config_default_compat_recorrection_enabled" />
<CheckBoxPreference <CheckBoxPreference
android:key="show_settings_key" android:key="show_settings_key"
android:title="@string/prefs_settings_key" android:title="@string/prefs_settings_key"

View File

@ -227,14 +227,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public static class UIHandler extends StaticInnerHandlerWrapper<LatinIME> { public static class UIHandler extends StaticInnerHandlerWrapper<LatinIME> {
private static final int MSG_UPDATE_SUGGESTIONS = 0; private static final int MSG_UPDATE_SUGGESTIONS = 0;
private static final int MSG_UPDATE_OLD_SUGGESTIONS = 1; private static final int MSG_UPDATE_SHIFT_STATE = 1;
private static final int MSG_UPDATE_SHIFT_STATE = 2; private static final int MSG_VOICE_RESULTS = 2;
private static final int MSG_VOICE_RESULTS = 3; private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 3;
private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 4; private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 4;
private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 5; private static final int MSG_SPACE_TYPED = 5;
private static final int MSG_SPACE_TYPED = 6; private static final int MSG_SET_BIGRAM_PREDICTIONS = 6;
private static final int MSG_SET_BIGRAM_PREDICTIONS = 7; private static final int MSG_PENDING_IMS_CALLBACK = 7;
private static final int MSG_PENDING_IMS_CALLBACK = 8;
public UIHandler(LatinIME outerInstance) { public UIHandler(LatinIME outerInstance) {
super(outerInstance); super(outerInstance);
@ -249,9 +248,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
case MSG_UPDATE_SUGGESTIONS: case MSG_UPDATE_SUGGESTIONS:
latinIme.updateSuggestions(); latinIme.updateSuggestions();
break; break;
case MSG_UPDATE_OLD_SUGGESTIONS:
// TODO: remove MSG_UPDATE_OLD_SUGGESTIONS message
break;
case MSG_UPDATE_SHIFT_STATE: case MSG_UPDATE_SHIFT_STATE:
switcher.updateShiftState(); switcher.updateShiftState();
break; break;
@ -296,16 +292,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return hasMessages(MSG_UPDATE_SUGGESTIONS); return hasMessages(MSG_UPDATE_SUGGESTIONS);
} }
public void postUpdateOldSuggestions() {
removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
sendMessageDelayed(obtainMessage(MSG_UPDATE_OLD_SUGGESTIONS),
getOuterInstance().mSettingsValues.mDelayUpdateOldSuggestions);
}
public void cancelUpdateOldSuggestions() {
removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
}
public void postUpdateShiftKeyState() { public void postUpdateShiftKeyState() {
removeMessages(MSG_UPDATE_SHIFT_STATE); removeMessages(MSG_UPDATE_SHIFT_STATE);
sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE),
@ -838,7 +824,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (inputView != null) inputView.cancelAllMessages(); if (inputView != null) inputView.cancelAllMessages();
// Remove pending messages related to update suggestions // Remove pending messages related to update suggestions
mHandler.cancelUpdateSuggestions(); mHandler.cancelUpdateSuggestions();
mHandler.cancelUpdateOldSuggestions();
} }
@Override @Override
@ -1533,7 +1518,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (Keyboard.CODE_SPACE == primaryCode) { if (Keyboard.CODE_SPACE == primaryCode) {
if (!isCursorTouchingWord()) { if (!isCursorTouchingWord()) {
mHandler.cancelUpdateSuggestions(); mHandler.cancelUpdateSuggestions();
mHandler.cancelUpdateOldSuggestions();
mHandler.postUpdateBigramPredictions(); mHandler.postUpdateBigramPredictions();
} }
} else { } else {
@ -1621,7 +1605,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} }
mHandler.cancelUpdateSuggestions(); mHandler.cancelUpdateSuggestions();
mHandler.cancelUpdateOldSuggestions();
mHandler.cancelUpdateBigramPredictions(); mHandler.cancelUpdateBigramPredictions();
if (!mHasUncommittedTypedChars) { if (!mHasUncommittedTypedChars) {

View File

@ -64,7 +64,6 @@ public class Settings extends InputMethodSettingsActivity
public static final String PREF_VIBRATE_ON = "vibrate_on"; public static final String PREF_VIBRATE_ON = "vibrate_on";
public static final String PREF_SOUND_ON = "sound_on"; public static final String PREF_SOUND_ON = "sound_on";
public static final String PREF_KEY_PREVIEW_POPUP_ON = "popup_on"; public static final String PREF_KEY_PREVIEW_POPUP_ON = "popup_on";
public static final String PREF_RECORRECTION_ENABLED = "recorrection_enabled";
public static final String PREF_AUTO_CAP = "auto_cap"; public static final String PREF_AUTO_CAP = "auto_cap";
public static final String PREF_SHOW_SETTINGS_KEY = "show_settings_key"; public static final String PREF_SHOW_SETTINGS_KEY = "show_settings_key";
public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode"; public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode";
@ -435,12 +434,6 @@ public class Settings extends InputMethodSettingsActivity
generalSettings.removePreference(findPreference(PREF_KEY_PREVIEW_POPUP_ON)); generalSettings.removePreference(findPreference(PREF_KEY_PREVIEW_POPUP_ON));
} }
final boolean showRecorrectionOption = res.getBoolean(
R.bool.config_enable_show_recorrection_option);
if (!showRecorrectionOption) {
generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED));
}
final boolean showBigramSuggestionsOption = res.getBoolean( final boolean showBigramSuggestionsOption = res.getBoolean(
R.bool.config_enable_bigram_suggestions_option); R.bool.config_enable_bigram_suggestions_option);
if (!showBigramSuggestionsOption) { if (!showBigramSuggestionsOption) {