author | jianqin.zhang <jianqin.zhang@amlogic.com> | 2015-02-28 11:26:01 (GMT) |
---|---|---|
committer | tao.dong <tao.dong@amlogic.com> | 2015-03-24 03:20:57 (GMT) |
commit | 7bc0018769314c29746d5fa2dfd98707785b92dd (patch) | |
tree | a3c523681a4ebc64014f70893f6e2e2e844919b4 | |
parent | ad9027b666d07dd4adc1f6972238b639309eb3eb (diff) | |
download | RemoteIME-7bc0018769314c29746d5fa2dfd98707785b92dd.zip RemoteIME-7bc0018769314c29746d5fa2dfd98707785b92dd.tar.gz RemoteIME-7bc0018769314c29746d5fa2dfd98707785b92dd.tar.bz2 |
pd#103500 change the default language input method
Change-Id: I1e922720c0c1a77814c7c3054fe96d22c00f6ac9
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/InputModeSwitcher.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/amlogic/inputmethod/remote/InputModeSwitcher.java b/src/com/amlogic/inputmethod/remote/InputModeSwitcher.java index 577dd09..1ec33d4 100755 --- a/src/com/amlogic/inputmethod/remote/InputModeSwitcher.java +++ b/src/com/amlogic/inputmethod/remote/InputModeSwitcher.java @@ -21,6 +21,7 @@ import com.amlogic.inputmethod.remote.SoftKeyboard.KeyRow; import android.content.res.Resources; import android.view.inputmethod.EditorInfo; +import java.util.Locale; /** * Switcher used to switching input mode between Chinese, English, symbol,etc. */ @@ -137,6 +138,11 @@ public class InputModeSwitcher { private static final int MASK_CASE_UPPER = 0x00200000; /** + * Mode for inputing English with soft keyboard. + */ + public static final int MODE_SKB_ENGLISH = (MASK_SKB_LAYOUT_QWERTY | MASK_LANGUAGE_EN); + + /** * Mode for inputing Chinese with soft keyboard. */ public static final int MODE_SKB_CHINESE = (MASK_SKB_LAYOUT_QWERTY | MASK_LANGUAGE_CN); @@ -374,6 +380,11 @@ public class InputModeSwitcher { public InputModeSwitcher(RemoteIME imeService) { mImeService = imeService; + if("zh".equals(Locale.getDefault().getLanguage())){ + mRecentLauageInputMode = MODE_SKB_CHINESE; + }else{ + mRecentLauageInputMode = MODE_SKB_ENGLISH; + } Resources r = mImeService.getResources(); mToggleStateCn = Integer.parseInt(r.getString(R.string.toggle_cn)); mToggleStateCnCand = Integer.parseInt(r |