diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 17 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 8 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/Utils.java | 13 |
3 files changed, 14 insertions, 24 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 67a9f3203..fcd9229ec 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -81,8 +81,7 @@ import java.util.Locale; /** * Input method implementation for Qwerty'ish keyboard. */ -public class LatinIME extends InputMethodService implements KeyboardActionListener, - SharedPreferences.OnSharedPreferenceChangeListener { +public class LatinIME extends InputMethodService implements KeyboardActionListener { private static final String TAG = "LatinIME"; private static final boolean PERF_DEBUG = false; private static final boolean TRACE = false; @@ -395,7 +394,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); registerReceiver(mReceiver, filter); mVoiceConnector = VoiceIMEConnector.init(this, prefs, mHandler); - prefs.registerOnSharedPreferenceChangeListener(this); } /** @@ -1942,19 +1940,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } @Override - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, - String key) { - mSubtypeSwitcher.onSharedPreferenceChanged(sharedPreferences, key); - if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) { - mRefreshKeyboardRequired = true; - } else if (Settings.PREF_RECORRECTION_ENABLED.equals(key)) { - mReCorrectionEnabled = sharedPreferences.getBoolean( - Settings.PREF_RECORRECTION_ENABLED, - mResources.getBoolean(R.bool.config_default_recorrection_enabled)); - } - } - - @Override public void onSwipeDown() { if (mConfigSwipeDownDismissKeyboardEnabled) handleClose(); diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index d8c89a0d4..dee3da425 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -472,14 +472,6 @@ public class SubtypeSwitcher { } } - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - if (mConfigUseSpacebarLanguageSwitcher) { - if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) { - mLanguageSwitcher.loadLocales(sharedPreferences); - } - } - } - /** * Change system locale for this application * @param newLocale diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java index e980d3a30..aafafbf2f 100644 --- a/java/src/com/android/inputmethod/latin/Utils.java +++ b/java/src/com/android/inputmethod/latin/Utils.java @@ -261,6 +261,19 @@ public class Utils { return dp[sl][tl]; } + // Get the current stack trace + public static String getStackTrace() { + StringBuilder sb = new StringBuilder(); + try { + throw new RuntimeException(); + } catch (RuntimeException e) { + StackTraceElement[] frames = e.getStackTrace(); + // Start at 1 because the first frame is here and we don't care about it + for (int j = 1; j < frames.length; ++j) sb.append(frames[j].toString() + "\n"); + } + return sb.toString(); + } + // In dictionary.cpp, getSuggestion() method, // suggestion scores are computed using the below formula. // original score (called 'frequency') |