Home | History | Annotate | Download | only in ui

Lines Matching refs:suggestions

21 import com.android.quicksearchbox.Suggestions;
28 * A {@link SuggestionsListAdapter} that doesn't expose the new suggestions
38 private Suggestions mPendingSuggestions;
52 public void setSuggestions(Suggestions suggestions) {
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);
65 setPendingSuggestions(suggestions);
70 * Gets whether the given suggestions are non-empty for the selected source.
72 private boolean shouldPublish(Suggestions suggestions) {
73 if (suggestions.isDone()) return true;
74 SuggestionCursor cursor = suggestions.getResult();
81 private void setPendingSuggestions(Suggestions suggestions) {
82 if (mPendingSuggestions == suggestions) {
86 if (suggestions != null) {
87 suggestions.release();
96 // Close old suggestions, but only if they are not also the current
97 // suggestions.
102 mPendingSuggestions = suggestions;
114 if (DBG) Log.d(TAG, "Suggestions now available, publishing: " + mPendingSuggestions);
116 // The suggestions are no longer pending.
138 public Suggestions getSuggestions() {