diff options
author | 2012-09-05 20:26:01 +0900 | |
---|---|---|
committer | 2012-09-05 20:32:35 +0900 | |
commit | cde005c05ec6b552ec26740b578be12c7d24013b (patch) | |
tree | 7ce9621b963ba82f76824c750542f62e6270408f /native/jni/src/proximity_info_state.cpp | |
parent | 2a2b5edc21c9bbea0ee172baf4b90053ceff98b5 (diff) | |
download | latinime-cde005c05ec6b552ec26740b578be12c7d24013b.tar.gz latinime-cde005c05ec6b552ec26740b578be12c7d24013b.tar.xz latinime-cde005c05ec6b552ec26740b578be12c7d24013b.zip |
Fix apostrophe issue
Bug: 7109083
Change-Id: I47275b1bd5fae023981cae502628f5a8284f49ce
Diffstat (limited to 'native/jni/src/proximity_info_state.cpp')
-rw-r--r-- | native/jni/src/proximity_info_state.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index 4c67ea81c..b363dcc36 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -395,6 +395,11 @@ float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, flo const int index = inputIndex * mProximityInfo->getKeyCount() + keyId; return min(mDistanceCache[index] * scale, mMaxPointToKeyLength); } + // TODO: Do not hardcode here + // No penalty to ' and - + if (codePoint == '\'' || codePoint == '-') { + return 0; + } // If the char is not a key on the keyboard then return the max length. return MAX_POINT_TO_KEY_LENGTH; } |