am f702fa41: Merge change I53c8228b into eclair

Merge commit 'f702fa413273d175ba499bcb9bd352d208621d95' into eclair-mr2

* commit 'f702fa413273d175ba499bcb9bd352d208621d95':
  Fix type of _id col in SearchableDictionary
This commit is contained in:
Bjorn Bringert
2009-11-09 11:57:37 -08:00
committed by Android Git Automerger

View File

@@ -106,16 +106,17 @@ public class DictionaryProvider extends ContentProvider {
List<Dictionary.Word> words = Dictionary.getInstance().getMatches(processedQuery); List<Dictionary.Word> words = Dictionary.getInstance().getMatches(processedQuery);
MatrixCursor cursor = new MatrixCursor(COLUMNS); MatrixCursor cursor = new MatrixCursor(COLUMNS);
long id = 0;
for (Dictionary.Word word : words) { for (Dictionary.Word word : words) {
cursor.addRow(columnValuesOfWord(word)); cursor.addRow(columnValuesOfWord(id++, word));
} }
return cursor; return cursor;
} }
private Object[] columnValuesOfWord(Dictionary.Word word) { private Object[] columnValuesOfWord(long id, Dictionary.Word word) {
return new String[] { return new Object[] {
word.word, // _id id, // _id
word.word, // text1 word.word, // text1
word.definition, // text2 word.definition, // text2
word.word, // intent_data (included when clicking on item) word.word, // intent_data (included when clicking on item)