private void onSubmitQuery(){
  CharSequence query=mSearchEditText.getText();
  if (query != null && TextUtils.getTrimmedLength(query) > 0) {
    if (mOnQueryTextListener == null || !mOnQueryTextListener.onQueryTextSubmit(query.toString())) {
      if (mShouldKeepHistory) {
        saveQueryToDb(query.toString(),System.currentTimeMillis());
      }
      refreshAdapterCursor();
      closeSearch();
      mSearchEditText.setText("");
    }
  }
}

private void onSubmitQuery ( ) { CharSequence query = mSearchEditText . getText ( ) ; if ( query != null && TextUtils . getTrimmedLength ( query ) > 0 ) { if ( mOnQueryTextListener == null || ! mOnQueryTextListener . onQueryTextSubmit ( query . toString ( ) ) ) { if ( mShouldKeepHistory ) { saveQueryToDb ( query . toString ( ) , System . currentTimeMillis ( ) ) ; } refreshAdapterCursor ( ) ; closeSearch ( ) ; mSearchEditText . setText ( "" ) ; } } }
called when a query is submitted . this will close the search view .
