am 4d1f3d11: Merge "Make gestures work correctly on keyboards with accented keys" into jb-mr1-dev

* commit '4d1f3d11db7f8efb1fe7a9d3cba39c31a98c6e79':
  Make gestures work correctly on keyboards with accented keys
main
Tom Ouyang 2012-09-26 22:53:08 -07:00 committed by Android Git Automerger
commit bb79e073a7
1 changed files with 3 additions and 3 deletions

View File

@ -239,8 +239,8 @@ int ProximityInfo::getKeyIndexOf(const int c) const {
// We do not have the coordinate data // We do not have the coordinate data
return NOT_AN_INDEX; return NOT_AN_INDEX;
} }
const int baseLowerC = static_cast<int>(toBaseLowerCase(c)); const int lowerCode = static_cast<int>(toLowerCase(c));
hash_map_compat<int, int>::const_iterator mapPos = mCodeToKeyMap.find(baseLowerC); hash_map_compat<int, int>::const_iterator mapPos = mCodeToKeyMap.find(lowerCode);
if (mapPos != mCodeToKeyMap.end()) { if (mapPos != mCodeToKeyMap.end()) {
return mapPos->second; return mapPos->second;
} }
@ -258,7 +258,7 @@ void ProximityInfo::initializeG() {
// TODO: Optimize // TODO: Optimize
for (int i = 0; i < KEY_COUNT; ++i) { for (int i = 0; i < KEY_COUNT; ++i) {
const int code = mKeyCodePoints[i]; const int code = mKeyCodePoints[i];
const int lowerCode = toBaseLowerCase(code); const int lowerCode = static_cast<int>(toLowerCase(code));
mCenterXsG[i] = mKeyXCoordinates[i] + mKeyWidths[i] / 2; mCenterXsG[i] = mKeyXCoordinates[i] + mKeyWidths[i] / 2;
mCenterYsG[i] = mKeyYCoordinates[i] + mKeyHeights[i] / 2; mCenterYsG[i] = mKeyYCoordinates[i] + mKeyHeights[i] / 2;
mCodeToKeyMap[lowerCode] = i; mCodeToKeyMap[lowerCode] = i;