@NonNull public CharSequence getQuery() {
        if (searchView != null) {
            return searchView.getQuery();
        } else if (supportView != null) {
            return supportView.getQuery();
        }
        throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
    }
@ NonNull public CharSequence getQuery ( ) { if ( searchView != null ) { return searchView . getQuery ( ) ; } else if ( supportView != null ) { return supportView . getQuery ( ) ; } throw new IllegalStateException ( ERROR_NO_SEARCHVIEW ) ; }
Returns the query string currently in the text field.

@return the query string