diff options
author | 2013-02-11 22:45:16 -0800 | |
---|---|---|
committer | 2013-02-11 22:45:16 -0800 | |
commit | a869080b04ad61f106ecdfa0816a390081e86360 (patch) | |
tree | f9bf36abe7915998d270161157c981502d0685dc /java/src | |
parent | 08a2bbc738c30a8eaab3f2f2dd6c3ba9ee8535d5 (diff) | |
parent | 4cbe84ad08f38bf9c6f8852b406f5052e862a747 (diff) | |
download | latinime-a869080b04ad61f106ecdfa0816a390081e86360.tar.gz latinime-a869080b04ad61f106ecdfa0816a390081e86360.tar.xz latinime-a869080b04ad61f106ecdfa0816a390081e86360.zip |
am 4cbe84ad: Merge "Fix RTL language key code mapping"
# Via Android (Google) Code Review (1) and Tadashi G. Takaoka (1)
* commit '4cbe84ad08f38bf9c6f8852b406f5052e862a747':
Fix RTL language key code mapping
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java index 6ad9d286f..0ec6b0176 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardCodesSet.java @@ -74,6 +74,7 @@ public final class KeyboardCodesSet { private static final int CODE_LEFT_CURLY_BRACKET = '{'; private static final int CODE_RIGHT_CURLY_BRACKET = '}'; + // This array should be aligned with the array RTL below. private static final int[] DEFAULT = { Constants.CODE_TAB, Constants.CODE_ENTER, @@ -117,6 +118,7 @@ public final class KeyboardCodesSet { DEFAULT[12], DEFAULT[13], DEFAULT[14], + DEFAULT[15], CODE_RIGHT_PARENTHESIS, CODE_LEFT_PARENTHESIS, CODE_GREATER_THAN_SIGN, @@ -140,6 +142,9 @@ public final class KeyboardCodesSet { }; static { + if (DEFAULT.length != RTL.length) { + throw new RuntimeException("Internal inconsistency"); + } for (int i = 0; i < ID_TO_NAME.length; i++) { sNameToIdMap.put(ID_TO_NAME[i], i); } |