aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-05-18 02:34:37 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-18 02:34:37 -0700
commit0b47f3af83648293afb836250756cc14dffcde4b (patch)
treed5e8eaac628c435d36f23da5a8df14ce327bc479 /java/src/com/android/inputmethod/latin/LatinIME.java
parenta205d23ffdec7e89933c5052ddf325af344f4af0 (diff)
parenteaa10f44a4a0108a90803b1b28238842d3fb5add (diff)
downloadlatinime-0b47f3af83648293afb836250756cc14dffcde4b.tar.gz
latinime-0b47f3af83648293afb836250756cc14dffcde4b.tar.xz
latinime-0b47f3af83648293afb836250756cc14dffcde4b.zip
Merge "Show full display names in the popup of the spacebar language swicher"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2c39eba55..18f743883 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -406,7 +406,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private void initSuggest() {
final String localeStr = mSubtypeSwitcher.getInputLocaleStr();
- final Locale keyboardLocale = new Locale(localeStr);
+ final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr);
final Resources res = mResources;
final Locale savedLocale = Utils.setSystemLocale(res, keyboardLocale);
@@ -440,7 +440,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
/* package private */ void resetSuggestMainDict() {
final String localeStr = mSubtypeSwitcher.getInputLocaleStr();
- final Locale keyboardLocale = new Locale(localeStr);
+ final Locale keyboardLocale = Utils.constructLocaleFromString(localeStr);
int mainDicResId = Utils.getMainDictionaryResourceId(mResources);
mSuggest.resetMainDict(this, mainDicResId, keyboardLocale);
}
@@ -1553,7 +1553,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// a magic space even if it was a normal space. This is meant to help in case the user
// pressed space on purpose of displaying the suggestion strip punctuation.
final char primaryCode = suggestion.charAt(0);
- final CharSequence beforeText = ic.getTextBeforeCursor(1, 0);
+ final CharSequence beforeText = ic != null ? ic.getTextBeforeCursor(1, 0) : "";
final int toLeft = (ic == null || TextUtils.isEmpty(beforeText))
? 0 : beforeText.charAt(0);
final boolean oldMagicSpace = mJustAddedMagicSpace;