Merge "Use language agnostic QWERTY for forceAscii"
commit
c7e43a7aec
|
@ -34,6 +34,7 @@ import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
import com.android.inputmethod.latin.StringUtils;
|
import com.android.inputmethod.latin.StringUtils;
|
||||||
|
import com.android.inputmethod.latin.SubtypeLocale;
|
||||||
import com.android.inputmethod.latin.XmlParseUtils;
|
import com.android.inputmethod.latin.XmlParseUtils;
|
||||||
|
|
||||||
import org.xmlpull.v1.XmlPullParser;
|
import org.xmlpull.v1.XmlPullParser;
|
||||||
|
@ -247,7 +248,8 @@ public class KeyboardSet {
|
||||||
final boolean forceAscii = EditorInfoCompatUtils.hasFlagForceAscii(
|
final boolean forceAscii = EditorInfoCompatUtils.hasFlagForceAscii(
|
||||||
mParams.mEditorInfo.imeOptions)
|
mParams.mEditorInfo.imeOptions)
|
||||||
|| deprecatedForceAscii;
|
|| deprecatedForceAscii;
|
||||||
mParams.mLocale = (forceAscii && !asciiCapable) ? Locale.US : inputLocale;
|
mParams.mLocale = (forceAscii && !asciiCapable)
|
||||||
|
? SubtypeLocale.LOCALE_NO_LANGUAGE_QWERTY : inputLocale;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,9 @@ public class SubtypeSwitcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean needsToDisplayLanguage(Locale keyboardLocale) {
|
public boolean needsToDisplayLanguage(Locale keyboardLocale) {
|
||||||
|
if (keyboardLocale.equals(SubtypeLocale.LOCALE_NO_LANGUAGE_QWERTY)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!keyboardLocale.equals(mInputLocale)) {
|
if (!keyboardLocale.equals(mInputLocale)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue