Merge "Use language agnostic QWERTY for forceAscii"

main
Tadashi G. Takaoka 2012-04-03 21:06:52 -07:00 committed by Android (Google) Code Review
commit c7e43a7aec
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;
}