Esempio n. 1
0
 private void clearSuggestions() {
   if (mUpdateSuggestionsTask != null) {
     mUpdateSuggestionsTask.cancel(false);
     mUpdateSuggestionsTask = null;
   }
   setSuggestionsCursor(null);
 }
Esempio n. 2
0
 private void updateSuggestions() {
   clearAllTasks();
   if (mQuery == null) {
     setSuggestionsCursor(null);
   } else {
     mUpdateSuggestionsTask = new UpdateSuggestionsTask();
     mUpdateSuggestionsTask.execute(mQuery);
   }
 }
Esempio n. 3
0
 private void clearAllTasks() {
   if (mUpdateSearchResultsTask != null) {
     mUpdateSearchResultsTask.cancel(false);
     mUpdateSearchResultsTask = null;
   }
   if (mUpdateSuggestionsTask != null) {
     mUpdateSuggestionsTask.cancel(false);
     mUpdateSuggestionsTask = null;
   }
 }