From cde005c05ec6b552ec26740b578be12c7d24013b Mon Sep 17 00:00:00 2001 From: Satoshi Kataoka Date: Wed, 5 Sep 2012 20:26:01 +0900 Subject: [PATCH] Fix apostrophe issue Bug: 7109083 Change-Id: I47275b1bd5fae023981cae502628f5a8284f49ce --- native/jni/src/proximity_info_state.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; }