code: public void setQuery(CharSequence query, boolean submit) {
          mQueryTextView.setText(query);
          if (query != null) {
              mQueryTextView.setSelection(mQueryTextView.length());
              mUserQuery = query;
          }
  
          // If the query is not empty and submit is requested, submit the query
          if (submit && !TextUtils.isEmpty(query)) {
              onSubmitQuery();
          }
      }
docs: Sets a query string in the text field and optionally submits the query as well.
  
  @param query the query string. This replaces any query text already present in the
  text field.
  @param submit whether to submit the query right now or only update the contents of
  text field.