Bug 825120 - Fake selection update to force IME hard reset; r=cpeterson

This commit is contained in:
Jim Chen
2013-01-11 15:34:58 -05:00
parent 6f98ed08c0
commit 16c9fbdd1b
2 changed files with 31 additions and 16 deletions

View File

@@ -22,6 +22,7 @@ final class InputMethods {
public static final String METHOD_IWNN = "jp.co.omronsoft.iwnnime.ml/.standardcommon.IWnnLanguageSwitcher";
public static final String METHOD_OPENWNN_PLUS = "com.owplus.ime.openwnnplus/.OpenWnnJAJP";
public static final String METHOD_SIMEJI = "com.adamrocker.android.input.simeji/.OpenWnnSimeji";
public static final String METHOD_STOCK_LATINIME = "com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME";
public static final String METHOD_SWYPE = "com.swype.android.inputmethod/.SwypeInputMethod";
public static final String METHOD_SWYPE_BETA = "com.nuance.swype.input/.IME";
@@ -83,4 +84,10 @@ final class InputMethods {
// The locale may change while Firefox is running, but the device and OS should not. :)
return sIsPreJellyBeanAsusTransformer && !Locale.getDefault().equals(Locale.US);
}
public static boolean needsSoftResetWorkaround(String inputMethod) {
// Stock latin IME on Android 4.2 and above
return Build.VERSION.SDK_INT >= 17 &&
inputMethod.equals(METHOD_STOCK_LATINIME);
}
}