From b2ef894e6784226cb86cb32891e6542e1ea5c233 Mon Sep 17 00:00:00 2001 From: crimean Date: Fri, 2 Nov 2018 19:01:16 +0300 Subject: [PATCH] Revert "Search - introduce top visible types" This reverts commit efde801caf7ea4f0168e8e68bff323a803249f55. --- .../java/net/osmand/search/SearchUICore.java | 3 +-- .../net/osmand/search/core/ObjectType.java | 4 --- OsmAnd/AndroidManifest.xml | 2 +- OsmAnd/build.gradle | 26 +------------------ build.gradle | 4 +-- gradle.properties | 2 +- plugins/Osmand-Nautical/AndroidManifest.xml | 2 +- .../Osmand-ParkingPlugin/AndroidManifest.xml | 2 +- plugins/Osmand-SRTMPlugin/AndroidManifest.xml | 2 +- plugins/Osmand-Skimaps/AndroidManifest.xml | 2 +- 10 files changed, 10 insertions(+), 39 deletions(-) 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 4e328ad156..5e3a62c05d 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java @@ -731,8 +731,7 @@ public class SearchUICore { @Override public int compare(SearchResult o1, SearchResult o2) { - if (!ObjectType.isTopVisible(o1.objectType) && !ObjectType.isTopVisible(o2.objectType) - && o1.getFoundWordCount() != o2.getFoundWordCount()) { + if (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 399fa4011e..564c46d61a 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,10 +34,6 @@ 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 8d97f73933..c0d2b707a7 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 3bd78bb43a..48ce8473ba 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 ad6666073e..2361592b76 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 bcc116619c..3b4b598a11 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 6aefafebcb..569666c600 100644 --- a/plugins/Osmand-Skimaps/AndroidManifest.xml +++ b/plugins/Osmand-Skimaps/AndroidManifest.xml @@ -4,7 +4,7 @@ android:versionCode="9" android:versionName="1.0" > - +