code: private void handleTextChanged() {
          // Ignore requests if the last word in keywords is prefixed by the currently avoided prefix
          if (mAvoidedPrefix != null) {
              String[] keywords = getCurrentKeywordsString().split(" ");
              // Add null and length check to avoid the ArrayIndexOutOfBoundsException
              if (keywords.length == 0) {
                  return;
              }
              String lastKeyword = keywords[keywords.length - 1];
              if (lastKeyword.startsWith(mAvoidedPrefix)) {
                  return;
              } else {
                  setAvoidedPrefix(null);
              }
          }
  
          // Request suggestions from the QueryClient
          QueryToken queryToken = getQueryTokenIfValid();
          if (queryToken != null && mQueryTokenReceiver != null) {
              // Valid token, so send query to the app for processing
              mQueryTokenReceiver.onQueryReceived(queryToken);
          } else {
              // Ensure that the suggestions are hidden
              if (mSuggestionsVisibilityManager != null) {
                  mSuggestionsVisibilityManager.displaySuggestions(false);
              }
          }
      }
docs: Called after the {@link Editable} text within the {@link EditText} has been changed. Note that
  editing text in this function is guaranteed to be safe and not cause an infinite loop.