am 68c8472d: Merge "Make forceCommit true for gesture shortcut score."

* commit '68c8472d47d8ceaf6e79f6295e7c3e2bdce777d6':
  Make forceCommit true for gesture shortcut score.
main
Keisuke Kuroyanagi 2013-12-01 22:34:46 -08:00 committed by Android Git Automerger
commit bef5aff469
1 changed files with 4 additions and 1 deletions

View File

@ -235,8 +235,11 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
// Shortcut is not supported for multiple words suggestions.
// TODO: Check shortcuts during traversal for multiple words suggestions.
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);
const int shortcutBaseScore = SCORING->doesAutoCorrectValidWord() ?
SCORING->calculateFinalScore(compoundDistance, traverseSession->getInputSize(),
true /* forceCommit */) : finalScore;
const int updatedOutputWordIndex = ShortcutUtils::outputShortcuts(&shortcutIt,
outputWordIndex, finalScore, outputCodePoints, frequencies, outputTypes,
outputWordIndex, shortcutBaseScore, outputCodePoints, frequencies, outputTypes,
sameAsTyped);
const int secondWordFirstInputIndex = terminalDicNode->getSecondWordFirstInputIndex(
traverseSession->getProximityInfoState(0));