private boolean instantSearch(final String nonTrimmedQuery, final boolean keywordSearch, final boolean isClipboardSearch) {
        final String query = StringUtils.trim(nonTrimmedQuery);

        // try to interpret query as geocode
        if (instantSearchGeocache(query, isClipboardSearch)) {
            return true;
        }

        // try to interpret query as geocode
        if (instantSearchTrackable(query, keywordSearch)) {
            return true;
        }

        // keyword fallback, if desired by caller
        if (keywordSearch) {
            CacheListActivity.startActivityKeyword(this, query);
            ActivityMixin.overrideTransitionToFade(this);
            return true;
        }

        return false;
    }
Performs a search for query either as geocode, trackable code or keyword

@param nonTrimmedQuery   String to search for
@param keywordSearch     Set to true if keyword search should be performed if query isn't GC or TB
@param isClipboardSearch Set to true if search should try to extract a geocode from the search string
@return true if a search was performed, else false
main/src/main/java/cgeo/geocaching/SearchActivity.java