aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2012-09-05 05:23:42 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-05 05:23:42 -0700
commitea89c5e317d7b3e3723f65395fef0eb3a78774bc (patch)
tree7ce9621b963ba82f76824c750542f62e6270408f
parentbe136bb691d3f6e4a8f54731b35ae53390d56f01 (diff)
parent4bdbd254bb9c25630af7549dfc27c1192f6b9e09 (diff)
downloadlatinime-ea89c5e317d7b3e3723f65395fef0eb3a78774bc.tar.gz
latinime-ea89c5e317d7b3e3723f65395fef0eb3a78774bc.tar.xz
latinime-ea89c5e317d7b3e3723f65395fef0eb3a78774bc.zip
am 4bdbd254: am cde005c0: Fix apostrophe issue
* commit '4bdbd254bb9c25630af7549dfc27c1192f6b9e09': Fix apostrophe issue
-rw-r--r--native/jni/src/proximity_info_state.cpp5
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;
}