diff --git a/OsmAnd/build-common.gradle b/OsmAnd/build-common.gradle index f6ebc2fa16a..255079e63b8 100644 --- a/OsmAnd/build-common.gradle +++ b/OsmAnd/build-common.gradle @@ -386,7 +386,7 @@ dependencies { implementation "androidx.car.app:app-projected:1.2.0" implementation 'com.google.android.gms:play-services-location:21.0.1' - implementation 'com.github.ByteHamster:SearchPreference:v2.5.1' + implementation 'com.github.KnollFrank:SearchPreference:d1a3cb44e0' implementation 'com.google.guava:guava:30.1.1-jre' //implementation "androidx.tracing:tracing:1.1.0" diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java index 77a3b04bd41..0d523b78828 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/BaseSettingsFragment.java @@ -395,7 +395,7 @@ private void setupSearchablePreferences() { if (searchPreference != null) { final SearchConfiguration config = searchPreference.getSearchConfiguration(); config.setActivity(getMapActivity()); - indexItems(getPreferences(getPreferenceScreen()), config); + config.indexItems(getPreferences(getPreferenceScreen())); } } @@ -411,10 +411,6 @@ private static List getPreferences(final PreferenceGroup preferenceG return preferencesBuilder.build(); } - private static void indexItems(final List preferences, final SearchConfiguration config) { - preferences.forEach(config::indexItem); - } - protected void onBindPreferenceViewHolder(@NonNull Preference preference, @NonNull PreferenceViewHolder holder) { if (preference.isSelectable()) { View selectableView = holder.itemView.findViewById(R.id.selectable_list_item);