code: public void setDismissOnOutsideClick(boolean enable) {
  
          mDismissOnOutsideTouch = enable;
          mSuggestionsSection.setOnTouchListener(new OnTouchListener() {
              @Override
              public boolean onTouch(View v, MotionEvent event) {
  
                  //todo check if this is called twice
                  if (mDismissOnOutsideTouch && mIsFocused) {
                      setSearchFocusedInternal(false);
                  }
  
                  return true;
              }
          });
      }
docs: Set whether a touch outside of the
  search bar's bounds will cause the search bar to
  loos focus.
  
  @param enable true to dismiss on outside touch, false otherwise.