diff --git a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
index 5e3a62c05d..4e328ad156 100644
--- a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
+++ b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
@@ -731,7 +731,8 @@ public class SearchUICore {
@Override
public int compare(SearchResult o1, SearchResult o2) {
- if (o1.getFoundWordCount() != o2.getFoundWordCount()) {
+ if (!ObjectType.isTopVisible(o1.objectType) && !ObjectType.isTopVisible(o2.objectType)
+ && o1.getFoundWordCount() != o2.getFoundWordCount()) {
return -Algorithms.compare(o1.getFoundWordCount(), o2.getFoundWordCount());
}
if (!sortByName) {
diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java
index 564c46d61a..399fa4011e 100644
--- a/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java
+++ b/OsmAnd-java/src/main/java/net/osmand/search/core/ObjectType.java
@@ -34,6 +34,10 @@ public enum ObjectType {
return t == CITY || t == VILLAGE || t == POSTCODE || t == STREET || t == HOUSE || t == STREET_INTERSECTION;
}
+ public static boolean isTopVisible(ObjectType t) {
+ return t == POI_TYPE || t == FAVORITE || t == FAVORITE_GROUP || t == WPT || t == LOCATION || t == PARTIAL_LOCATION;
+ }
+
public static ObjectType getExclusiveSearchType(ObjectType t) {
if (t == FAVORITE_GROUP) {
return FAVORITE;
diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml
index c0d2b707a7..8d97f73933 100644
--- a/OsmAnd/AndroidManifest.xml
+++ b/OsmAnd/AndroidManifest.xml
@@ -39,7 +39,7 @@
-
22
# UPDATE: temporairly commented since gradle plugin updated to 3.1.3 and claims INSTALL_FAILED_DEXOPT is fixed
# UPDATE 2: D8 causes problems on arm64 devices with Android 6.0 (API 23)
- android.enableD8=false
+#android.enableD8=false
diff --git a/plugins/Osmand-Nautical/AndroidManifest.xml b/plugins/Osmand-Nautical/AndroidManifest.xml
index 48ce8473ba..3bd78bb43a 100644
--- a/plugins/Osmand-Nautical/AndroidManifest.xml
+++ b/plugins/Osmand-Nautical/AndroidManifest.xml
@@ -5,7 +5,7 @@
android:versionCode="9"
android:versionName="1.0" >
-
+
diff --git a/plugins/Osmand-ParkingPlugin/AndroidManifest.xml b/plugins/Osmand-ParkingPlugin/AndroidManifest.xml
index 2361592b76..ad6666073e 100644
--- a/plugins/Osmand-ParkingPlugin/AndroidManifest.xml
+++ b/plugins/Osmand-ParkingPlugin/AndroidManifest.xml
@@ -4,7 +4,7 @@
android:versionCode="9"
android:versionName="1.0" >
-
+
diff --git a/plugins/Osmand-SRTMPlugin/AndroidManifest.xml b/plugins/Osmand-SRTMPlugin/AndroidManifest.xml
index 3b4b598a11..bcc116619c 100644
--- a/plugins/Osmand-SRTMPlugin/AndroidManifest.xml
+++ b/plugins/Osmand-SRTMPlugin/AndroidManifest.xml
@@ -4,7 +4,7 @@
android:versionCode="9"
android:versionName="1.0" >
-
+
diff --git a/plugins/Osmand-Skimaps/AndroidManifest.xml b/plugins/Osmand-Skimaps/AndroidManifest.xml
index 569666c600..6aefafebcb 100644
--- a/plugins/Osmand-Skimaps/AndroidManifest.xml
+++ b/plugins/Osmand-Skimaps/AndroidManifest.xml
@@ -4,7 +4,7 @@
android:versionCode="9"
android:versionName="1.0" >
-
+