Skip to content
Snippets Groups Projects
Commit cde005c0 authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Fix apostrophe issue

Bug: 7109083
Change-Id: I47275b1bd5fae023981cae502628f5a8284f49ce
parent 2a2b5edc
No related branches found
No related tags found
No related merge requests found
...@@ -395,6 +395,11 @@ float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, flo ...@@ -395,6 +395,11 @@ float ProximityInfoState::getPointToKeyLength(int inputIndex, int codePoint, flo
const int index = inputIndex * mProximityInfo->getKeyCount() + keyId; const int index = inputIndex * mProximityInfo->getKeyCount() + keyId;
return min(mDistanceCache[index] * scale, mMaxPointToKeyLength); 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. // If the char is not a key on the keyboard then return the max length.
return MAX_POINT_TO_KEY_LENGTH; return MAX_POINT_TO_KEY_LENGTH;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment