aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/inputmethod/latin')
-rw-r--r--src/com/android/inputmethod/latin/LanguageSwitcher.java7
-rw-r--r--src/com/android/inputmethod/latin/LatinIME.java11
2 files changed, 16 insertions, 2 deletions
diff --git a/src/com/android/inputmethod/latin/LanguageSwitcher.java b/src/com/android/inputmethod/latin/LanguageSwitcher.java
index 97173533d..3fa882e44 100644
--- a/src/com/android/inputmethod/latin/LanguageSwitcher.java
+++ b/src/com/android/inputmethod/latin/LanguageSwitcher.java
@@ -108,6 +108,13 @@ public class LanguageSwitcher {
return mSelectedLanguageArray[mCurrentIndex];
}
+
+ /**
+ * Returns the list of enabled language codes.
+ */
+ public String[] getEnabledLanguages() {
+ return mSelectedLanguageArray;
+ }
/**
* Returns the currently selected input locale, or the display locale if no specific
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java
index 992456183..ef761a06e 100644
--- a/src/com/android/inputmethod/latin/LatinIME.java
+++ b/src/com/android/inputmethod/latin/LatinIME.java
@@ -1202,7 +1202,10 @@ public class LatinIME extends InputMethodService
setSuggestions(null, false, false, true);
FieldContext context = new FieldContext(
- getCurrentInputConnection(), getCurrentInputEditorInfo());
+ getCurrentInputConnection(),
+ getCurrentInputEditorInfo(),
+ mLanguageSwitcher.getInputLanguage(),
+ mLanguageSwitcher.getEnabledLanguages());
mVoiceInput.startListening(context, swipe);
switchToRecognitionStatusView();
}
@@ -1576,7 +1579,11 @@ public class LatinIME extends InputMethodService
}
private FieldContext makeFieldContext() {
- return new FieldContext(getCurrentInputConnection(), getCurrentInputEditorInfo());
+ return new FieldContext(
+ getCurrentInputConnection(),
+ getCurrentInputEditorInfo(),
+ mLanguageSwitcher.getInputLanguage(),
+ mLanguageSwitcher.getEnabledLanguages());
}
private boolean fieldCanDoVoice(FieldContext fieldContext) {