Searched refs:suggestions (Results 1 - 25 of 32) sorted by relevance

12

/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
H A DDelayingSuggestionsAdapter.java28 * A {@link SuggestionsListAdapter} that doesn't expose the new suggestions
52 public void setSuggestions(Suggestions suggestions) { argument
53 if (suggestions == null) {
58 if (shouldPublish(suggestions)) {
59 if (DBG) Log.d(TAG, "Publishing suggestions immediately: " + suggestions);
60 mDelayedAdapter.setSuggestions(suggestions);
61 // Clear any old pending suggestions.
64 if (DBG) Log.d(TAG, "Delaying suggestions publishing: " + suggestions);
72 shouldPublish(Suggestions suggestions) argument
81 setPendingSuggestions(Suggestions suggestions) argument
[all...]
H A DSuggestionsAdapterBase.java32 * Base class for suggestions adapters. The templated class A is the list adapter class.
85 public void setSuggestions(Suggestions suggestions) { argument
86 if (mSuggestions == suggestions) {
90 if (suggestions != null) {
91 suggestions.release();
98 // TODO: delay the change if there are no suggestions for the currently visible tab.
103 mSuggestions = suggestions;
151 protected View getView(SuggestionCursor suggestions, int position, long suggestionId, argument
153 suggestions.moveTo(position);
154 View v = mViewFactory.getView(suggestions, suggestion
[all...]
H A DSuggestionsAdapter.java27 * Interface for suggestions adapters.
35 * Sets the listener to be notified of clicks on suggestions.
45 * Sets the current suggestions.
47 void setSuggestions(Suggestions suggestions); argument
50 * Indicates if there's any suggestions in this adapter.
55 * Gets the current suggestions.
H A DSearchActivityView.java95 mSuggestionsView = (SuggestionsView) findViewById(R.id.suggestions);
102 // suggestions?
201 public void setSuggestions(Suggestions suggestions) { argument
202 suggestions.acquire();
203 mSuggestionsAdapter.setSuggestions(suggestions);
220 * Sets the text in the query box. Does not update the suggestions.
336 * is All or Web, use the web search suggestions as completions.
342 Suggestions suggestions = mSuggestionsAdapter.getSuggestions();
343 if (suggestions == null) return;
344 CompletionInfo[] completions = webSuggestionsToCompletions(suggestions);
349 webSuggestionsToCompletions(Suggestions suggestions) argument
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/spellcheck/
H A DAndroidSpellCheckerServiceTest.java37 final String[] suggestions = span.getSuggestions();
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();
58 // For this test we consider "годп" should yield at least 2 suggestions (at this moment
60 assertTrue(suggestions.length >= 2);
63 assertEquals("", "года", suggestions[0]);
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DSuggestionsProviderImpl.java63 final Suggestions suggestions = new Suggestions(query, sourceToQuery);
68 receiver = new SuggestionCursorReceiver(suggestions);
71 suggestions.done();
78 return suggestions;
95 public SuggestionCursorReceiver(Suggestions suggestions) { argument
96 mSuggestions = suggestions;
H A DEventLogLogger.java70 String suggestions = getSuggestions(suggestionCursor);
72 EventLogTags.writeQsbClick(id, suggestions, null, numChars,
88 String suggestions = getSuggestions(suggestionCursor);
89 EventLogTags.writeQsbExit(suggestions, numChars);
H A DSearchActivity.java67 // or suggestions, since QSB was last started.
266 // TODO we should log both sets of suggestions in 2-pane mode
378 SuggestionCursor suggestions = pos.getCursor();
380 if (suggestions == null) {
383 int count = suggestions.getCount();
388 suggestions.moveTo(position);
400 // Since the intents for suggestions specified by suggestion providers,
423 protected void launchSuggestion(SuggestionCursor suggestions, int position) { argument
424 suggestions.moveTo(position);
425 Intent intent = SuggestionUtils.getSuggestionIntent(suggestions, mAppSearchDat
458 gotSuggestions(Suggestions suggestions) argument
485 showSuggestions(Suggestions suggestions) argument
[all...]
H A DListSuggestionCursor.java48 public ListSuggestionCursor(String userQuery, Suggestion...suggestions) {
49 this(userQuery, suggestions.length);
50 for (Suggestion suggestion : suggestions) {
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DRichInputConnectionAndTextRangeTests.java136 * Test for getting previous word (for bigram suggestions)
139 // If one of the following cases breaks, the bigram suggestions won't work.
245 SuggestionSpan[] suggestions;
248 suggestions = r.getSuggestionSpansAtWord();
249 assertEquals(suggestions.length, 1);
250 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
260 suggestions = r.getSuggestionSpansAtWord();
261 assertEquals(suggestions.length, 2);
262 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
263 MoreAsserts.assertEquals(suggestions[
[all...]
H A DInputLogicTestsLanguageWithoutSpaces.java22 import com.android.inputmethod.latin.suggestions.SuggestionStripView;
H A DInputLogicTestsNonEnglish.java21 import com.android.inputmethod.latin.suggestions.SuggestionStripView;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
H A DDictionaryCollection.java66 ArrayList<SuggestedWordInfo> suggestions = dictionaries.get(0).getSuggestions(composer,
68 if (null == suggestions) suggestions = CollectionUtils.newArrayList();
73 if (null != sugg) suggestions.addAll(sugg);
75 return suggestions;
H A DExpandableDictionary.java33 * be searched for suggestions and valid words.
240 final ArrayList<SuggestedWordInfo> suggestions =
242 return suggestions;
245 final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
246 runBigramReverseLookUp(prevWord, suggestions);
247 return suggestions;
253 final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
272 getWordsRec(mRoots, codes, mWordBuilder, 0, false, 1, 0, -1, suggestions);
274 getWordsRec(mRoots, codes, mWordBuilder, 0, false, 1, 0, i, suggestions);
276 return suggestions;
360 addWordAndShortcutsFromNode(final Node node, final char[] word, final int depth, final int finalFreq, final ArrayList<SuggestedWordInfo> suggestions) argument
407 getWordsRec(final NodeArray roots, final WordComposer codes, final char[] word, final int depth, final boolean completion, final int snr, final int inputIndex, final int skipPos, final ArrayList<SuggestedWordInfo> suggestions) argument
590 runBigramReverseLookUp(final String previousWord, final ArrayList<SuggestedWordInfo> suggestions) argument
610 reverseLookUp(final LinkedList<NextWord> terminalNodes, final ArrayList<SuggestedWordInfo> suggestions) argument
[all...]
H A DSuggest.java43 * This class loads a dictionary and provides a list of suggestions for a given sequence of
232 // Retrieves suggestions for the typing input
233 // and calls the callback function with the suggestions.
353 // Retrieves suggestions for the batch input
354 // and calls the callback function with the suggestions.
396 // For some reason some suggestions with MIN_VALUE are making their way here.
415 final String typedWord, final ArrayList<SuggestedWordInfo> suggestions) {
416 final SuggestedWordInfo typedWordInfo = suggestions.get(0);
418 final int suggestionsSize = suggestions.size();
425 final SuggestedWordInfo cur = suggestions
414 getSuggestionsInfoListWithDebugInfo( final String typedWord, final ArrayList<SuggestedWordInfo> suggestions) argument
[all...]
H A DBinaryDictionary.java99 * @param useFullEditDistance whether to use the full edit distance in suggestions
204 final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
225 suggestions.add(new SuggestedWordInfo(new String(mOutputCodePoints, start, len),
231 return suggestions;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
H A DAndroidWordLevelSpellCheckerSession.java59 public SuggestionsParams(String[] suggestions, int flags) { argument
60 mSuggestions = suggestions;
86 String query, String prevWord, String[] suggestions, int flags) {
87 if (suggestions == null || TextUtils.isEmpty(query)) {
91 generateKey(query, prevWord), new SuggestionsParams(suggestions, flags));
204 // If the string contains a period, native returns strange suggestions (it seems
205 // to return suggestions for everything up to the period only and to ignore the
207 // TODO: investigate why native returns these suggestions and remove this code.
250 * Gets a list of suggestions for a specific string. This returns a list of possible
298 // TODO: Don't gather suggestions i
85 putSuggestionsToCache( String query, String prevWord, String[] suggestions, int flags) argument
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
H A DMoreSuggestionsView.java17 package com.android.inputmethod.latin.suggestions;
27 import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionsListener;
H A DSuggestionStripView.java17 package com.android.inputmethod.latin.suggestions;
43 import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionsListener;
56 // The maximum number of suggestions available. See {@link Suggest#mPrefMaxSuggestions}.
78 * Construct a {@link SuggestionStripView} for showing suggestions to be picked by the user.
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/
H A DGoogleSuggestClient.java50 * Use network-based Google Suggests to provide search suggestions.
94 * suggestions ordered by best match.
122 * 2 which contain the suggestions and their popularity.
125 JSONArray suggestions = results.getJSONArray(1);
127 if (DBG) Log.d(LOG_TAG, "Got " + suggestions.length() + " results");
128 return new GoogleSuggestCursor(this, query, suggestions, popularity);
163 /* Contains the actual suggestions */
172 JSONArray suggestions, JSONArray popularity) {
174 mSuggestions = suggestions;
171 GoogleSuggestCursor(Source source, String userQuery, JSONArray suggestions, JSONArray popularity) argument
/packages/apps/Browser/src/com/android/browser/search/
H A DOpenSearchSearchEngine.java45 * Provides search suggestions, if any, for a given web search provider.
123 * suggestions ordered by best match.
145 * should be JSON arrays. The second element/array contains the suggestions and the
150 JSONArray suggestions = results.getJSONArray(1);
160 return new SuggestionsCursor(suggestions, descriptions);
218 public SuggestionsCursor(JSONArray suggestions, JSONArray descriptions) { argument
219 mSuggestions = suggestions;
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
H A DSuggestionCursorUtil.java34 public static void assertNoSuggestions(SuggestionCursor suggestions) { argument
35 assertNoSuggestions("", suggestions);
38 public static void assertNoSuggestions(String message, SuggestionCursor suggestions) { argument
39 assertNotNull(suggestions);
40 assertEquals(message, 0, suggestions.getCount());
218 assertTrue(message + ", no suggestions", observed.getCount() > 0);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
H A DStringUtils.java118 public static void removeDupes(final ArrayList<String> suggestions) { argument
119 if (suggestions.size() < 2) return;
121 // Don't cache suggestions.size(), since we may be removing items
122 while (i < suggestions.size()) {
123 final String cur = suggestions.get(i);
126 final String previous = suggestions.get(j);
128 suggestions.remove(i);
/packages/apps/Calendar/src/com/android/calendar/
H A DGeneralPreferences.java409 SearchRecentSuggestions suggestions = new SearchRecentSuggestions(getActivity(),
412 suggestions.clearHistory();
H A DSearchActivity.java214 SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this,
217 suggestions.saveRecentQuery(searchQuery, null);

Completed in 2303 milliseconds

12