Use language agnostic QWERTY for forceAscii

Bug: 6286208
Change-Id: I1b3b6f04c9033e7dc57a30e8dce43e01428b8e4e
This commit is contained in:
Tadashi G. Takaoka 2012-04-04 12:52:11 +09:00
parent 3bf57a5624
commit 32bfc1601a
2 changed files with 6 additions and 1 deletions

View file

@ -34,6 +34,7 @@ import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.StringUtils;
import com.android.inputmethod.latin.SubtypeLocale;
import com.android.inputmethod.latin.XmlParseUtils;
import org.xmlpull.v1.XmlPullParser;
@ -247,7 +248,8 @@ public class KeyboardSet {
final boolean forceAscii = EditorInfoCompatUtils.hasFlagForceAscii(
mParams.mEditorInfo.imeOptions)
|| deprecatedForceAscii;
mParams.mLocale = (forceAscii && !asciiCapable) ? Locale.US : inputLocale;
mParams.mLocale = (forceAscii && !asciiCapable)
? SubtypeLocale.LOCALE_NO_LANGUAGE_QWERTY : inputLocale;
return this;
}

View file

@ -375,6 +375,9 @@ public class SubtypeSwitcher {
}
public boolean needsToDisplayLanguage(Locale keyboardLocale) {
if (keyboardLocale.equals(SubtypeLocale.LOCALE_NO_LANGUAGE_QWERTY)) {
return true;
}
if (!keyboardLocale.equals(mInputLocale)) {
return false;
}