mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Duplicate enabled languages when there is only one enabled language"
This commit is contained in:
commit
8dac5fe98d
@ -426,8 +426,15 @@ public class SubtypeSwitcher {
|
||||
if (mConfigUseSpacebarLanguageSwitcher) {
|
||||
return mLanguageSwitcher.getEnabledLanguages();
|
||||
} else {
|
||||
int enabledLanguageCount = mEnabledLanguagesOfCurrentInputMethod.size();
|
||||
// Workaround for explicitly specifying the voice language
|
||||
if (enabledLanguageCount == 1) {
|
||||
mEnabledLanguagesOfCurrentInputMethod.add(
|
||||
mEnabledLanguagesOfCurrentInputMethod.get(0));
|
||||
++enabledLanguageCount;
|
||||
}
|
||||
return mEnabledLanguagesOfCurrentInputMethod.toArray(
|
||||
new String[mEnabledLanguagesOfCurrentInputMethod.size()]);
|
||||
new String[enabledLanguageCount]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class VoiceIMEConnector implements VoiceInput.UiListener {
|
||||
private static final int RECOGNITIONVIEW_HEIGHT_THRESHOLD_RATIO = 6;
|
||||
|
||||
private static final String TAG = VoiceIMEConnector.class.getSimpleName();
|
||||
private static boolean DEBUG = LatinImeLogger.sDBG;
|
||||
private static final boolean DEBUG = LatinImeLogger.sDBG;
|
||||
|
||||
private boolean mAfterVoiceInput;
|
||||
private boolean mHasUsedVoiceInput;
|
||||
@ -715,7 +715,7 @@ public class VoiceIMEConnector implements VoiceInput.UiListener {
|
||||
mHandler.updateVoiceResults();
|
||||
}
|
||||
|
||||
public FieldContext makeFieldContext() {
|
||||
private FieldContext makeFieldContext() {
|
||||
SubtypeSwitcher switcher = SubtypeSwitcher.getInstance();
|
||||
return new FieldContext(mService.getCurrentInputConnection(),
|
||||
mService.getCurrentInputEditorInfo(), switcher.getInputLocaleStr(),
|
||||
|
Loading…
Reference in New Issue
Block a user