Make forceCommit true for gesture shortcut score.

Bug: 11951198
Change-Id: I18e450378d8a21b51eb02ab31b57467c8a9b1ac8
This commit is contained in:
Keisuke Kuroyanagi 2013-12-02 14:25:44 +09:00
parent 5c48f1970a
commit 5cad89493d

View file

@ -235,8 +235,11 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
// Shortcut is not supported for multiple words suggestions. // Shortcut is not supported for multiple words suggestions.
// TODO: Check shortcuts during traversal for multiple words suggestions. // TODO: Check shortcuts during traversal for multiple words suggestions.
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode); 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, const int updatedOutputWordIndex = ShortcutUtils::outputShortcuts(&shortcutIt,
outputWordIndex, finalScore, outputCodePoints, frequencies, outputTypes, outputWordIndex, shortcutBaseScore, outputCodePoints, frequencies, outputTypes,
sameAsTyped); sameAsTyped);
const int secondWordFirstInputIndex = terminalDicNode->getSecondWordFirstInputIndex( const int secondWordFirstInputIndex = terminalDicNode->getSecondWordFirstInputIndex(
traverseSession->getProximityInfoState(0)); traverseSession->getProximityInfoState(0));