@Override
        protected Cursor query(@NonNull final String searchTerm) {
            final boolean showExtended = Settings.extendedSettingsAreEnabled();
            final SettingsSearchSuggestionCursor resultCursor = new SettingsSearchSuggestionCursor();
            if (searchTerm.length() > 2) {
                synchronized (searchdata) {
                    for (BasePreferenceFragment.PrefSearchDescriptor item : searchdata) {
                        if ((StringUtils.containsIgnoreCase(item.prefTitle, searchTerm) || StringUtils.containsIgnoreCase(item.prefSummary, searchTerm)) && (showExtended || item.isBasicSetting)) {
                            resultCursor.addItem(item.prefTitle, item.prefSummary, item.prefKey, item.prefCategoryIconRes);
                        }
                    }
                }
            }
            return resultCursor;
        }
This method sets the fragment given by its base key,
and optionally starts scrolling to a preference identified by its key
main/src/main/java/cgeo/geocaching/settings/SettingsActivity.java