HomeSort by relevance Sort by last modified time
    Searched refs:suggestions (Results 1 - 25 of 88) sorted by null

1 2 3 4

  /packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
SuggestionsProviderImplTest.java 58 Suggestions suggestions = mProvider.getSuggestions("foo", local
60 suggestions.setShortcuts(mShortcutRepo.getShortcutsForQuery(
63 assertEquals(1, suggestions.getExpectedResultCount());
64 assertEquals(0, suggestions.getResultCount());
65 assertEquals(0, promote(suggestions).getCount());
67 assertEquals(1, suggestions.getExpectedResultCount());
68 assertEquals(1, suggestions.getResultCount());
70 promote(suggestions).getCount());
73 if (suggestions != null) suggestions.release()
78 Suggestions suggestions = mProvider.getSuggestions("foo", local
    [all...]
SingleCorpusPromoterTest.java 41 Suggestions suggestions = makeSuggestions(TEST_QUERY); local
44 mPromoter.pickPromoted(suggestions, 4, promoted);
57 private Suggestions makeSuggestions(String query) {
58 Suggestions suggestions = new Suggestions(query, mCorpora); local
63 suggestions.addCorpusResults(results);
64 return suggestions;
RankAwarePromoterTest.java 50 List<CorpusResult> suggestions = getSuggestions(TEST_QUERY); local
53 mPromoter.promoteSuggestions(suggestions, MAX_PROMOTED_SUGGESTIONS, promoted);
62 List<CorpusResult> suggestions = getSuggestions(TEST_QUERY); local
67 // (e.g. a shortcut) into the promoted suggestions list, and the current
72 CorpusResult corpora2 = suggestions.get(2);
77 mPromoter.promoteSuggestions(suggestions, MAX_PROMOTED_SUGGESTIONS, promoted);
83 // 2 because only 2 test suggestions per corpus are generated
84 // by the test data generator, and we use up all our suggestions
112 List<CorpusResult> suggestions = getSuggestions(TEST_QUERY); local
119 mPromoter.promoteSuggestions(suggestions, MAX_PROMOTED_SUGGESTIONS, promoted)
    [all...]
SuggestionCursorWithExtrasTest.java 133 // this roughly approcimates what happens to suggestions
134 CursorBackedSourceResult suggestions = new CursorBackedSourceResult( local
136 assertEquals("Number of suggestions", 1, suggestions.getCount());
137 suggestions.moveTo(0);
138 SuggestionCursorBackedCursor observedCursor = new SuggestionCursorBackedCursor(suggestions);
153 CursorBackedSourceResult suggestions = new CursorBackedSourceResult( local
156 assertEquals("Suggestions count matches cursor count",
157 cursor.getCount(), suggestions.getCount());
160 suggestions.moveTo(0)
    [all...]
ResultPromoterTest.java 96 private ListSuggestionCursor promoteSuggestions(List<CorpusResult> suggestions) {
100 promoter.promoteSuggestions(suggestions, MAX_PROMOTED_SUGGESTIONS, promoted);
108 private SuggestionCursor cursor(Suggestion... suggestions) {
109 return new ListSuggestionCursor(mQuery, suggestions);
  /packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
Promoter.java 21 * Promoters choose which suggestions to promote from all the available suggestions.
27 * Gets the promoted suggestions.
29 * @param suggestions The suggestions to promote from.
30 * @param maxPromoted The maximum number of suggestions to promote.
31 * @param promoted List to add the promoted suggestions to.
33 void pickPromoted(Suggestions suggestions, int maxPromoted, ListSuggestionCursor promoted);
AbstractPromoter.java 34 Suggestions suggestions, int maxPromoted, ListSuggestionCursor promoted) {
35 doPickPromoted(suggestions, maxPromoted, promoted);
37 mNext.pickPromoted(suggestions, maxPromoted, promoted);
42 Suggestions suggestions, int maxPromoted, ListSuggestionCursor promoted);
RankAwarePromoter.java 27 * A promoter that gives preference to suggestions from higher ranking corpora.
39 public void doPickPromoted(Suggestions suggestions,
41 promoteSuggestions(suggestions.getCorpusResults(), maxPromoted, promoted);
45 void promoteSuggestions(Iterable<CorpusResult> suggestions, int maxPromoted,
47 if (DBG) Log.d(TAG, "Available results: " + suggestions);
49 // Split non-empty results into important suggestions and not-so-important
50 // suggestions, each corpus's cursor positioned at the first suggestion.
53 partitionSuggestionsByRank(suggestions, highRankingSuggestions, lowRankingSuggestions);
58 // Then try to fill promoted list with the remaining high-ranking suggestions,
    [all...]
ShortcutRepository.java 43 void removeFromHistory(SuggestionCursor suggestions, int position);
59 void reportClick(SuggestionCursor suggestions, int position);
ShortcutCursor.java 64 ShortcutCursor(SuggestionCursor suggestions) {
65 this(suggestions, true, null, null, null);
68 public ShortcutCursor(SuggestionCursor suggestions, boolean allowWebSearchShortcuts,
70 this(suggestions.getUserQuery(), suggestions, uiThread, refresher, repository);
71 int count = suggestions.getCount();
74 suggestions.moveTo(i);
75 if (suggestions.getSuggestionSource() != null
76 && (allowWebSearchShortcuts || !suggestions.isWebSearchSuggestion())) {
77 add(new SuggestionPosition(suggestions));
    [all...]
SingleCorpusPromoter.java 22 * Promotes shortcuts and suggestions from a single corpus.
41 public void pickPromoted(Suggestions suggestions, int maxPromoted,
44 SuggestionCursor shortcuts = suggestions.getShortcuts();
46 // Add suggestions
47 CorpusResult corpusResult = suggestions.getCorpusResult(mCorpus);
WebPromoter.java 33 public void pickPromoted(Suggestions suggestions, int maxPromoted,
36 SuggestionCursor shortcuts = suggestions.getShortcuts();
51 CorpusResult webResult = suggestions.getWebResult();
SearchActivity.java 81 // or suggestions, since QSB was last started.
336 // TODO we should log both sets of suggestions in 2-pane mode
466 SuggestionCursor suggestions = pos.getCursor(); local
468 if (suggestions == null) {
471 int count = suggestions.getCount();
476 suggestions.moveTo(position);
481 Suggestions suggestions = mSearchActivityView.getSuggestions(); local
482 return suggestions == null ? null : suggestions.getIncludedCorpora()
672 Suggestions suggestions = getSuggestionsProvider().getSuggestions( local
    [all...]
  /external/chromium/chrome/browser/extensions/
extension_omnibox_unittest.cc 57 ExtensionOmniboxSuggestion suggestions; local
58 suggestions.description.resize(10);
59 EXPECT_TRUE(suggestions.ReadStylesFromValue(styles_value));
60 CompareClassification(styles_expected, suggestions.description_styles);
66 EXPECT_TRUE(suggestions.ReadStylesFromValue(styles_value));
67 CompareClassification(styles_expected, suggestions.description_styles);
93 ExtensionOmniboxSuggestion suggestions; local
94 suggestions.description.resize(10);
95 EXPECT_TRUE(suggestions.ReadStylesFromValue(styles_value));
96 CompareClassification(styles_expected, suggestions.description_styles)
129 ExtensionOmniboxSuggestion suggestions; local
    [all...]
  /packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DelayingSuggestionsAdapter.java 23 import com.android.quicksearchbox.Suggestions;
30 * A {@link SuggestionsListAdapter} that doesn't expose the new suggestions
40 private Suggestions mPendingSuggestions;
54 public void setSuggestions(Suggestions suggestions) {
55 if (suggestions == null) {
60 if (shouldPublish(suggestions)) {
61 if (DBG) Log.d(TAG, "Publishing suggestions immediately: " + suggestions);
62 mDelayedAdapter.setSuggestions(suggestions);
    [all...]
SuggestionsAdapterBase.java 22 import com.android.quicksearchbox.Suggestions;
33 * Base class for suggestions adapters. The templated class A is the list adapter class.
50 private Suggestions mSuggestions;
70 * Indicates if this adapter will publish suggestions other than those in the promoted list.
102 public void setSuggestions(Suggestions suggestions) {
103 if (mSuggestions == suggestions) {
107 if (suggestions != null) {
108 suggestions.release();
115 // TODO: delay the change if there are no suggestions for the currently visible tab
    [all...]
SuggestionsView.java 31 * Holds a list of suggestions.
111 int suggestions = Math.max(1, (int) Math.floor(maxHeight / suggestionHeight)); local
114 suggestionHeight + " -> maxSuggestions=" + suggestions);
116 mSuggestionsAdapter.setMaxPromoted(suggestions);
  /packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/spellcheck/
AndroidSpellCheckerServiceTest.java 37 final String[] suggestions = span.getSuggestions(); local
38 // For this test we consider "tgis" should yield at least 2 suggestions (at this moment
40 assertTrue(suggestions.length >= 2);
42 assertEquals("", "this", suggestions[0]);
57 final String[] suggestions = span.getSuggestions(); local
58 // For this test we consider "????" should yield at least 2 suggestions (at this moment
60 assertTrue(suggestions.length >= 2);
63 assertEquals("", "????", suggestions[0]);
  /external/chromium/chrome/browser/
spellchecker_platform_engine_unittest.cc 322 std::vector<string16> suggestions; local
323 SpellCheckerPlatform::FillSuggestionList(word, &suggestions);
326 for (size_t j = 0; j < suggestions.size(); j++) {
327 if (suggestions[j].compare(suggested_word) == 0) {
spellcheck_message_filter.h 24 std::vector<string16>* suggestions);
spellcheck_message_filter.cc 46 std::vector<string16>* suggestions) {
47 SpellCheckerPlatform::FillSuggestionList(word, suggestions);
  /frameworks/base/core/java/android/view/textservice/
SuggestionsInfo.java 25 * This class contains a metadata of suggestions from the text service
31 * Flag of the attributes of the suggestions that can be obtained by
37 * Flag of the attributes of the suggestions that can be obtained by
43 * Flag of the attributes of the suggestions that can be obtained by
45 * the result suggestions include highly recommended ones.
57 * @param suggestions from the text service
59 public SuggestionsInfo(int suggestionsAttributes, String[] suggestions) {
60 this(suggestionsAttributes, suggestions, 0, 0);
66 * @param suggestions from the text service
71 int suggestionsAttributes, String[] suggestions, int cookie, int sequence)
    [all...]
  /external/webkit/Tools/DumpRenderTree/chromium/
MockSpellCheck.h 65 void fillSuggestionList(const WebKit::WebString& word, Vector<WebKit::WebString>* suggestions);
MockSpellCheck.cpp 94 void MockSpellCheck::fillSuggestionList(const WebString& word, Vector<WebString>* suggestions)
97 suggestions->append(WebString::fromUTF8("welcome"));
  /packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DictionaryCollection.java 65 ArrayList<SuggestedWordInfo> suggestions = dictionaries.get(0).getSuggestions(composer,
67 if (null == suggestions) suggestions = CollectionUtils.newArrayList();
72 if (null != sugg) suggestions.addAll(sugg);
74 return suggestions;

Completed in 812 milliseconds

1 2 3 4