From 45f45a4fdb16d0fa44b4a34b880e5fabb41c1492 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 3 Oct 2011 18:12:53 +0900 Subject: [PATCH] Cleanup : remove recorrection-related stuff. This removes UPDATE_OLD_SUGGESTIONS, and the associated settings. Bug: 5402537 Change-Id: Ie87d4e05c54e4b7d2dd5a05f2d0b570e9cd3e463 --- java/res/values/config.xml | 2 -- java/res/values/strings.xml | 4 --- java/res/xml/prefs.xml | 6 ---- .../android/inputmethod/latin/LatinIME.java | 31 +++++-------------- .../android/inputmethod/latin/Settings.java | 7 ----- 5 files changed, 7 insertions(+), 43 deletions(-) diff --git a/java/res/values/config.xml b/java/res/values/config.xml index bcce58123..a3e8d4ac5 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -24,7 +24,6 @@ false true true - false true false true @@ -37,7 +36,6 @@ false - true false true true diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 9b3829f74..a1f34887b 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -326,10 +326,6 @@ Enable user feedback Help improve this input method editor by automatically sending usage statistics and crash reports to Google. - - Touch to correct words - - Touch entered words to correct them, only when suggestions are visible Keyboard theme diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index 312af2888..b54df2686 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -44,12 +44,6 @@ android:title="@string/popup_on_keypress" android:persistent="true" android:defaultValue="@bool/config_default_popup_preview" /> - { 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 = 2; - private static final int MSG_VOICE_RESULTS = 3; - private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 4; - private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 5; - private static final int MSG_SPACE_TYPED = 6; - private static final int MSG_SET_BIGRAM_PREDICTIONS = 7; - private static final int MSG_PENDING_IMS_CALLBACK = 8; + private static final int MSG_UPDATE_SHIFT_STATE = 1; + private static final int MSG_VOICE_RESULTS = 2; + private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 3; + private static final int MSG_DISMISS_LANGUAGE_ON_SPACEBAR = 4; + private static final int MSG_SPACE_TYPED = 5; + private static final int MSG_SET_BIGRAM_PREDICTIONS = 6; + private static final int MSG_PENDING_IMS_CALLBACK = 7; public UIHandler(LatinIME outerInstance) { super(outerInstance); @@ -249,9 +248,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar case MSG_UPDATE_SUGGESTIONS: latinIme.updateSuggestions(); break; - case MSG_UPDATE_OLD_SUGGESTIONS: - // TODO: remove MSG_UPDATE_OLD_SUGGESTIONS message - break; case MSG_UPDATE_SHIFT_STATE: switcher.updateShiftState(); break; @@ -296,16 +292,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar 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() { removeMessages(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(); // Remove pending messages related to update suggestions mHandler.cancelUpdateSuggestions(); - mHandler.cancelUpdateOldSuggestions(); } @Override @@ -1533,7 +1518,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (Keyboard.CODE_SPACE == primaryCode) { if (!isCursorTouchingWord()) { mHandler.cancelUpdateSuggestions(); - mHandler.cancelUpdateOldSuggestions(); mHandler.postUpdateBigramPredictions(); } } else { @@ -1621,7 +1605,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mHandler.cancelUpdateSuggestions(); - mHandler.cancelUpdateOldSuggestions(); mHandler.cancelUpdateBigramPredictions(); if (!mHasUncommittedTypedChars) { diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java index bd94bab34..d9508f4c1 100644 --- a/java/src/com/android/inputmethod/latin/Settings.java +++ b/java/src/com/android/inputmethod/latin/Settings.java @@ -64,7 +64,6 @@ public class Settings extends InputMethodSettingsActivity public static final String PREF_VIBRATE_ON = "vibrate_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_RECORRECTION_ENABLED = "recorrection_enabled"; 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_VOICE_SETTINGS_KEY = "voice_mode"; @@ -435,12 +434,6 @@ public class Settings extends InputMethodSettingsActivity 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( R.bool.config_enable_bigram_suggestions_option); if (!showBigramSuggestionsOption) {