am cde005c0: Fix apostrophe issue

* commit 'cde005c05ec6b552ec26740b578be12c7d24013b':
  Fix apostrophe issue
main
Satoshi Kataoka 2012-09-05 05:08:36 -07:00 committed by Android Git Automerger
commit 4bdbd254bb
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}