Home | History | Annotate | Download | only in ui

Lines Matching refs:Suggestions

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);
63 // Clear any old pending suggestions.
66 if (DBG) Log.d(TAG, "Delaying suggestions publishing: " + suggestions);
67 setPendingSuggestions(suggestions);
72 * Gets whether the given suggestions are non-empty for the selected source.
74 private boolean shouldPublish(Suggestions suggestions) {
75 if (suggestions.isDone()) return true;
76 SuggestionCursor cursor = mDelayedAdapter.getPromoted(suggestions);
80 Iterable<CorpusResult> results = suggestions.getCorpusResults();
90 private void setPendingSuggestions(Suggestions suggestions) {
91 if (mPendingSuggestions == suggestions) {
95 if (suggestions != null) {
96 suggestions.release();
105 // Close old suggestions, but only if they are not also the current
106 // suggestions.
111 mPendingSuggestions = suggestions;
123 if (DBG) Log.d(TAG, "Suggestions now available, publishing: " + mPendingSuggestions);
125 // The suggestions are no longer pending.
145 public Suggestions getSuggestions() {