am 0f276de0: Merge "Disable shortcut output for multi-word suggestions."

* commit '0f276de04d3493a4777a29eebbc88253db427edb':
  Disable shortcut output for multi-word suggestions.
main
Keisuke Kuroynagi 2013-07-03 04:35:11 -07:00 committed by Android Git Automerger
commit f939f60bd4
1 changed files with 8 additions and 3 deletions

View File

@ -227,9 +227,14 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
++outputWordIndex;
}
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);
outputWordIndex = ShortcutUtils::outputShortcuts(&terminalAttributes, outputWordIndex,
finalScore, outputCodePoints, frequencies, outputTypes, sameAsTyped);
if (!terminalDicNode->hasMultipleWords()) {
// Shortcut is not supported for multiple words suggestions.
// TODO: Check shortcuts during traversal for multiple words suggestions.
const bool sameAsTyped = TRAVERSAL->sameAsTyped(traverseSession, terminalDicNode);
outputWordIndex = ShortcutUtils::outputShortcuts(&terminalAttributes, outputWordIndex,
finalScore, outputCodePoints, frequencies, outputTypes, sameAsTyped);
}
DicNode::managedDelete(terminalDicNode);
}