Search - introduce top visible types
This commit is contained in:
parent
c6160eccdc
commit
efde801caf
10 changed files with 39 additions and 10 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
|
||||
<uses-feature android:name="com.sec.feature.spen_usp" android:required="false"/>
|
||||
|
||||
<uses-sdk android:targetSdkVersion="26" android:minSdkVersion="15"
|
||||
<uses-sdk android:targetSdkVersion="26"
|
||||
tools:overrideLibrary="com.getkeepsafe.taptargetview, studio.carbonylgroup.textfieldboxes, android.support.customtabs"/>
|
||||
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
|
|
|
@ -41,10 +41,16 @@ android {
|
|||
}
|
||||
|
||||
publishing {
|
||||
storeFile file("../keystores/debug.keystore")
|
||||
storePassword "android"
|
||||
keyAlias "androiddebugkey"
|
||||
keyPassword "android"
|
||||
/*
|
||||
storeFile file("/var/lib/jenkins/osmand_key")
|
||||
storePassword System.getenv("OSMAND_APK_PASSWORD")
|
||||
keyAlias "osmand"
|
||||
keyPassword System.getenv("OSMAND_APK_PASSWORD")
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,6 +363,16 @@ task appStart(type: Exec) {
|
|||
// commandLine 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n', 'net.osmand.plus/net.osmand.plus.activities.MapActivity'
|
||||
}
|
||||
|
||||
//configurations.all {
|
||||
// resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||
//}
|
||||
//
|
||||
//repositories {
|
||||
// // Local build
|
||||
// flatDir {
|
||||
// dirs 'libs'
|
||||
// }
|
||||
//}
|
||||
|
||||
project.logger.warn("Analytics enabled for free version: $analytics")
|
||||
dependencies {
|
||||
|
@ -366,7 +382,7 @@ dependencies {
|
|||
implementation 'com.google.firebase:firebase-messaging:12.0.1'
|
||||
implementation 'com.google.firebase:firebase-iid:12.0.1'
|
||||
implementation 'com.google.firebase:firebase-config:12.0.1'
|
||||
implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
|
||||
//implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
|
||||
}
|
||||
implementation 'com.android.support:multidex:1.0.1'
|
||||
implementation 'com.android.support:gridlayout-v7:27.1.1'
|
||||
|
@ -397,10 +413,18 @@ dependencies {
|
|||
qtcoredebugImplementation fileTree(include: ['QtAndroid.jar', 'QtAndroidBearer.jar'], dir: 'libs')
|
||||
|
||||
legacyImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar"
|
||||
|
||||
qtcoredebugImplementation "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
||||
qtcoredebugImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||
qtcoreImplementation "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
|
||||
qtcoreImplementation "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||
|
||||
// Test
|
||||
//qtcoreImplementation (name: 'OsmAndCore_android-release', ext: 'aar') { changing = true }
|
||||
//qtcoreImplementation (name: 'OsmAndCore_androidNativeRelease-release', ext: 'aar') { changing = true }
|
||||
//qtcoredebugImplementation (name: 'OsmAndCore_android-debug', ext: 'aar') { changing = true }
|
||||
//qtcoredebugImplementation (name: 'OsmAndCore_androidNativeDebug-debug', ext: 'aar') { changing = true }
|
||||
|
||||
implementation ("com.getkeepsafe.taptargetview:taptargetview:1.12.0"){
|
||||
exclude group: 'com.android.support'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.2.50'
|
||||
ext.kotlin_version = '1.2.71'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
@ -7,7 +7,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
//classpath 'com.android.tools.build:gradle:2.+'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
|
|
|
@ -18,4 +18,4 @@
|
|||
# for enableD8=true min sdk must be > 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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:versionCode="9"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16" />
|
||||
<uses-sdk android:targetSdkVersion="16" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
android:xlargeScreens="true" android:anyDensity="true" />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
android:versionCode="9"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />
|
||||
<uses-sdk android:targetSdkVersion="16" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
android:xlargeScreens="true" android:anyDensity="true" />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
android:versionCode="9"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16" />
|
||||
<uses-sdk android:targetSdkVersion="16" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
android:xlargeScreens="true" android:anyDensity="true" />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
android:versionCode="9"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16" />
|
||||
<uses-sdk android:targetSdkVersion="16" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
|
||||
android:xlargeScreens="true" android:anyDensity="true" />
|
||||
|
|
Loading…
Reference in a new issue