Home
last modified time | relevance | path

Searched refs:suggestions (Results 1 – 25 of 39) sorted by relevance

12

/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DDelayingSuggestionsAdapter.java52 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument
53 if (suggestions == null) { in setSuggestions()
58 if (shouldPublish(suggestions)) { in setSuggestions()
59 if (DBG) Log.d(TAG, "Publishing suggestions immediately: " + suggestions); in setSuggestions()
60 mDelayedAdapter.setSuggestions(suggestions); in setSuggestions()
64 if (DBG) Log.d(TAG, "Delaying suggestions publishing: " + suggestions); in setSuggestions()
65 setPendingSuggestions(suggestions); in setSuggestions()
72 private boolean shouldPublish(Suggestions suggestions) { in shouldPublish() argument
73 if (suggestions.isDone()) return true; in shouldPublish()
74 SuggestionCursor cursor = suggestions.getResult(); in shouldPublish()
[all …]
DSuggestionsAdapterBase.java85 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument
86 if (mSuggestions == suggestions) { in setSuggestions()
90 if (suggestions != null) { in setSuggestions()
91 suggestions.release(); in setSuggestions()
103 mSuggestions = suggestions; in setSuggestions()
151 protected View getView(SuggestionCursor suggestions, int position, long suggestionId, in getView() argument
153 suggestions.moveTo(position); in getView()
154 View v = mViewFactory.getView(suggestions, suggestions.getUserQuery(), convertView, parent); in getView()
DSearchActivityView.java95 mSuggestionsView = (SuggestionsView) findViewById(R.id.suggestions); in onFinishInflate()
201 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument
202 suggestions.acquire(); in setSuggestions()
203 mSuggestionsAdapter.setSuggestions(suggestions); in setSuggestions()
342 Suggestions suggestions = mSuggestionsAdapter.getSuggestions(); in updateInputMethodSuggestions()
343 if (suggestions == null) return; in updateInputMethodSuggestions()
344 CompletionInfo[] completions = webSuggestionsToCompletions(suggestions); in updateInputMethodSuggestions()
349 private CompletionInfo[] webSuggestionsToCompletions(Suggestions suggestions) { in webSuggestionsToCompletions() argument
350 SourceResult cursor = suggestions.getWebResult(); in webSuggestionsToCompletions()
DSuggestionsAdapter.java47 void setSuggestions(Suggestions suggestions); in setSuggestions() argument
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DRichInputConnectionAndTextRangeTests.java307 SuggestionSpan[] suggestions; in helpTestGetSuggestionSpansAtWord() local
310 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord()
311 assertEquals(suggestions.length, 1); in helpTestGetSuggestionSpansAtWord()
312 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1); in helpTestGetSuggestionSpansAtWord()
322 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord()
323 assertEquals(suggestions.length, 2); in helpTestGetSuggestionSpansAtWord()
324 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1); in helpTestGetSuggestionSpansAtWord()
325 MoreAsserts.assertEquals(suggestions[1].getSuggestions(), SUGGESTIONS2); in helpTestGetSuggestionSpansAtWord()
335 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord()
336 assertEquals(suggestions.length, 1); in helpTestGetSuggestionSpansAtWord()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSearchActivity.java378 SuggestionCursor suggestions = pos.getCursor(); in getCurrentSuggestions() local
380 if (suggestions == null) { in getCurrentSuggestions()
383 int count = suggestions.getCount(); in getCurrentSuggestions()
388 suggestions.moveTo(position); in getCurrentSuggestions()
423 protected void launchSuggestion(SuggestionCursor suggestions, int position) { in launchSuggestion() argument
424 suggestions.moveTo(position); in launchSuggestion()
425 Intent intent = SuggestionUtils.getSuggestionIntent(suggestions, mAppSearchData); in launchSuggestion()
458 private void gotSuggestions(Suggestions suggestions) { in gotSuggestions() argument
476 Suggestions suggestions = getSuggestionsProvider().getSuggestions( in updateSuggestions() local
480 gotSuggestions(suggestions); in updateSuggestions()
[all …]
DSuggestionsProviderImpl.java63 final Suggestions suggestions = new Suggestions(query, sourceToQuery); in getSuggestions() local
68 receiver = new SuggestionCursorReceiver(suggestions); in getSuggestions()
71 suggestions.done(); in getSuggestions()
78 return suggestions; in getSuggestions()
95 public SuggestionCursorReceiver(Suggestions suggestions) { in SuggestionCursorReceiver() argument
96 mSuggestions = suggestions; in SuggestionCursorReceiver()
DEventLogLogger.java70 String suggestions = getSuggestions(suggestionCursor); in logSuggestionClick() local
72 EventLogTags.writeQsbClick(id, suggestions, null, numChars, in logSuggestionClick()
88 String suggestions = getSuggestions(suggestionCursor); in logExit() local
89 EventLogTags.writeQsbExit(suggestions, numChars); in logExit()
DEventLogTags.logtags32 # the list of suggestions shown.
40 71002 qsb_click (id|2),(suggestions|3),(queried_sources|3),(num_chars|1),(click_type|1)
55 # @param suggestions The suggestions shown when the user left QSB. See qsb_click above.
57 71005 qsb_exit (suggestions|3),(num_chars|1)
DListSuggestionCursor.java48 public ListSuggestionCursor(String userQuery, Suggestion...suggestions) { in ListSuggestionCursor() argument
49 this(userQuery, suggestions.length); in ListSuggestionCursor()
50 for (Suggestion suggestion : suggestions) { in ListSuggestionCursor()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
DAndroidWordLevelSpellCheckerSession.java67 public SuggestionsParams(String[] suggestions, int flags) { in SuggestionsParams() argument
68 mSuggestions = suggestions; in SuggestionsParams()
87 final String query, final String[] suggestions, final int flags) { in putSuggestionsToCache() argument
88 if (suggestions == null || TextUtils.isEmpty(query)) { in putSuggestionsToCache()
93 new SuggestionsParams(suggestions, flags)); in putSuggestionsToCache()
345 final ArrayList<String> suggestions = new ArrayList<>(); in getResult() local
356 suggestions.add(suggestion); in getResult()
358 StringUtils.removeDupes(suggestions); in getResult()
362 suggestions.subList(0, Math.min(suggestions.size(), suggestionsLimit)); in getResult()
367 final String bestSuggestion = suggestions.get(0); in getResult()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/spellcheck/
DAndroidSpellCheckerServiceTest.java37 final String[] suggestions = span.getSuggestions(); in testSpellchecker() local
40 assertTrue(suggestions.length >= 2); in testSpellchecker()
42 assertEquals("Test basic spell checking", "this", suggestions[0]); in testSpellchecker()
71 final String[] suggestions = span.getSuggestions(); in testSpellcheckWithPeriods() local
74 suggestions[0]); in testSpellcheckWithPeriods()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DDictionaryCollection.java71 ArrayList<SuggestedWordInfo> suggestions = dictionaries.get(0).getSuggestions(composedData, in getSuggestions()
74 if (null == suggestions) suggestions = new ArrayList<>(); in getSuggestions()
80 if (null != sugg) suggestions.addAll(sugg); in getSuggestions()
82 return suggestions; in getSuggestions()
DSuggest.java139 @Nonnull final ArrayList<SuggestedWordInfo> suggestions) { in getWhitelistedWordInfoOrNull()
140 if (suggestions.isEmpty()) { in getWhitelistedWordInfoOrNull()
143 final SuggestedWordInfo firstSuggestedWordInfo = suggestions.get(0); in getWhitelistedWordInfoOrNull()
349 final String typedWord, final ArrayList<SuggestedWordInfo> suggestions) { in getSuggestionsInfoListWithDebugInfo() argument
350 final SuggestedWordInfo typedWordInfo = suggestions.get(0); in getSuggestionsInfoListWithDebugInfo()
352 final int suggestionsSize = suggestions.size(); in getSuggestionsInfoListWithDebugInfo()
358 final SuggestedWordInfo cur = suggestions.get(i + 1); in getSuggestionsInfoListWithDebugInfo()
DInputView.java28 import com.android.inputmethod.latin.suggestions.MoreSuggestionsView;
29 import com.android.inputmethod.latin.suggestions.SuggestionStripView;
DBinaryDictionary.java321 final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<>(); in getSuggestions() local
330 suggestions.add(new SuggestedWordInfo( in getSuggestions()
340 return suggestions; in getSuggestions()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/
DGoogleSuggestClient.java125 JSONArray suggestions = results.getJSONArray(1); in query() local
127 if (DBG) Log.d(LOG_TAG, "Got " + suggestions.length() + " results"); in query()
128 return new GoogleSuggestCursor(this, query, suggestions, popularity); in query()
172 JSONArray suggestions, JSONArray popularity) { in GoogleSuggestCursor() argument
174 mSuggestions = suggestions; in GoogleSuggestCursor()
/packages/apps/Settings/src/com/android/settings/dashboard/
DDashboardSummary.java234 List<Tile> suggestions = mSuggestionParser.getSuggestions(); in doInBackground() local
235 for (int i = 0; i < suggestions.size(); i++) { in doInBackground()
236 if (mSuggestionsChecks.isSuggestionComplete(suggestions.get(i))) { in doInBackground()
237 mAdapter.disableSuggestion(suggestions.get(i)); in doInBackground()
238 suggestions.remove(i--); in doInBackground()
241 return suggestions; in doInBackground()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/
DSuggestionSpanUtilsTest.java222 final String[] suggestions = new String[] {"Quality", "Speed", "Price"}; in testFindFirstLocaleFromSuggestionSpans() local
223 final SuggestionSpan nullLocaleSpan = new SuggestionSpan((Locale)null, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans()
224 final SuggestionSpan emptyLocaleSpan = new SuggestionSpan(new Locale(""), suggestions, 0); in testFindFirstLocaleFromSuggestionSpans()
225 final SuggestionSpan enUsLocaleSpan = new SuggestionSpan(Locale.US, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans()
226 final SuggestionSpan jaJpLocaleSpan = new SuggestionSpan(Locale.JAPAN, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DSuggestionCursorUtil.java34 public static void assertNoSuggestions(SuggestionCursor suggestions) { in assertNoSuggestions() argument
35 assertNoSuggestions("", suggestions); in assertNoSuggestions()
38 public static void assertNoSuggestions(String message, SuggestionCursor suggestions) { in assertNoSuggestions() argument
39 assertNotNull(suggestions); in assertNoSuggestions()
40 assertEquals(message, 0, suggestions.getCount()); in assertNoSuggestions()
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
DStringUtils.java179 public static void removeDupes(@Nonnull final ArrayList<String> suggestions) { in removeDupes() argument
180 if (suggestions.size() < 2) { in removeDupes()
185 while (i < suggestions.size()) { in removeDupes()
186 final String cur = suggestions.get(i); in removeDupes()
189 final String previous = suggestions.get(j); in removeDupes()
191 suggestions.remove(i); in removeDupes()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/settings/
DGeneralPrefsFragment.java169 final SuggestionsProvider suggestions = in onClick() local
171 suggestions.clearHistory(); in onClick()
172 suggestions.cleanup(); in onClick()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
DMoreSuggestionsView.java17 package com.android.inputmethod.latin.suggestions;
30 import com.android.inputmethod.latin.suggestions.MoreSuggestions.MoreSuggestionKey;
DSuggestionStripViewAccessor.java17 package com.android.inputmethod.latin.suggestions;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/
DInputLogic.java55 import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
1562 final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<>(); in restartSuggestionsOnWordTouchedByCursor()
1569 suggestions.add(typedWordInfo); in restartSuggestionsOnWordTouchedByCursor()
1579 suggestions.add(new SuggestedWordInfo(s, in restartSuggestionsOnWordTouchedByCursor()
1598 if (suggestions.size() <= 1) { in restartSuggestionsOnWordTouchedByCursor()
1613 final SuggestedWords suggestedWords = new SuggestedWords(suggestions, in restartSuggestionsOnWordTouchedByCursor()
1677 final ArrayList<String> suggestions = new ArrayList<>(); in revertCommit() local
1679 suggestions.add(committedWordString); in revertCommit()
1688 suggestions.add(suggestion); in revertCommit()
1700 suggestions.toArray(new String[suggestions.size()]), 0 /* flags */, in revertCommit()

12