diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java index d0e83333db..5e18b1ee96 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapDataObject.java @@ -157,14 +157,15 @@ public class BinaryMapDataObject { public int getSimpleLayer(){ if(mapIndex != null) { - for (int i = 0; i < additionalTypes.length; i++) { - if (mapIndex.positiveLayers.contains(additionalTypes[i])) { - return 1; - } else if (mapIndex.negativeLayers.contains(additionalTypes[i])) { - return -1; + if (additionalTypes != null) { + for (int i = 0; i < additionalTypes.length; i++) { + if (mapIndex.positiveLayers.contains(additionalTypes[i])) { + return 1; + } else if (mapIndex.negativeLayers.contains(additionalTypes[i])) { + return -1; + } } } - } return 0; } diff --git a/OsmAnd/.gitignore b/OsmAnd/.gitignore index 82cea33d56..3bffb9f7b3 100644 --- a/OsmAnd/.gitignore +++ b/OsmAnd/.gitignore @@ -6,6 +6,11 @@ gradlew.bat aarDependencies libs/android*.jar libs/com.*.jar +libs/org.*.jar +libs/commons-logging-commons-logging-api-1.1.jar +libs/fr.univ-valenciennes-bzip2-1.0.jar +libs/it.unibo.alice.tuprolog-tuprolog-3.2.1.jar + valgrind/ bin/ dist/ diff --git a/OsmAnd/AndroidManifest-free.xml b/OsmAnd/AndroidManifest-free.xml index a1ec36c6c0..4f02a7d75f 100644 --- a/OsmAnd/AndroidManifest-free.xml +++ b/OsmAnd/AndroidManifest-free.xml @@ -10,11 +10,6 @@ - - + + + + + + + + + diff --git a/OsmAnd/AndroidManifest-freedev.xml b/OsmAnd/AndroidManifest-freedev.xml index 47a4dbbeb6..f3878f22e8 100644 --- a/OsmAnd/AndroidManifest-freedev.xml +++ b/OsmAnd/AndroidManifest-freedev.xml @@ -5,6 +5,9 @@ + [^<]*<", ">" + System.getenv("APP_EDITION") + "<") } -// if (line.contains("\"app_version\"") && System.getenv("APK_VERSION")) { -// return line.replaceAll(">[^<]*<", ">" + System.getenv("APK_VERSION") + "<") -// } -// if (line.contains("\"app_version_suffix\"") && System.getenv("APK_VERSION_SUFFIX")) { -// return line.replaceAll("[^<]*<", ">" + System.getenv("APP_FEATURES") + "<") } @@ -401,8 +403,20 @@ dependencies { compile 'com.android.support:appcompat-v7:27.1.0' compile 'com.android.support:design:27.1.0' compile 'com.android.support:customtabs:27.1.0' - compile fileTree(include: ['bsh-core-2.0b4.jar', 'bzip2-20090327.jar', 'gnu-trove-osmand.jar', 'gson-2.5.jar', 'icu4j-49_1_patched.jar', 'jts-core-1.14.0.jar', 'junidecode-0.1.jar', 'simple-logging.jar', 'tuprolog.jar'], dir: 'libs') + compile fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') + compile 'commons-logging:commons-logging-api:1.1' + compile 'it.unibo.alice.tuprolog:tuprolog:3.2.1' + compile 'org.beanshell:bsh-core:2.0b4' + compile 'fr.univ-valenciennes:bzip2:1.0' + compile 'com.moparisthebest:junidecode:0.1.1' + compile 'org.immutables:gson:2.5.0' + compile 'com.vividsolutions:jts-core:1.14.0' +// size restrictions +// compile 'com.ibm.icu:icu4j:50.1' +// compile 'net.sf.trove4j:trove4j:3.0.3' + + legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar" qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" diff --git a/OsmAnd/libs/bsh-core-2.0b4.jar b/OsmAnd/libs/bsh-core-2.0b4.jar deleted file mode 100644 index a1b8e47288..0000000000 Binary files a/OsmAnd/libs/bsh-core-2.0b4.jar and /dev/null differ diff --git a/OsmAnd/libs/bzip2-20090327.jar b/OsmAnd/libs/bzip2-20090327.jar deleted file mode 100644 index 5a0f290a07..0000000000 Binary files a/OsmAnd/libs/bzip2-20090327.jar and /dev/null differ diff --git a/OsmAnd/libs/gson-2.5.jar b/OsmAnd/libs/gson-2.5.jar deleted file mode 100644 index 5c35c5d5ca..0000000000 Binary files a/OsmAnd/libs/gson-2.5.jar and /dev/null differ diff --git a/OsmAnd/libs/jts-core-1.14.0.jar b/OsmAnd/libs/jts-core-1.14.0.jar deleted file mode 100644 index a690bed698..0000000000 Binary files a/OsmAnd/libs/jts-core-1.14.0.jar and /dev/null differ diff --git a/OsmAnd/libs/junidecode-0.1.jar b/OsmAnd/libs/junidecode-0.1.jar deleted file mode 100644 index 7c79c879e5..0000000000 Binary files a/OsmAnd/libs/junidecode-0.1.jar and /dev/null differ diff --git a/OsmAnd/libs/simple-logging.jar b/OsmAnd/libs/simple-logging.jar deleted file mode 100644 index 89d3a05766..0000000000 Binary files a/OsmAnd/libs/simple-logging.jar and /dev/null differ diff --git a/OsmAnd/libs/tuprolog.jar b/OsmAnd/libs/tuprolog.jar deleted file mode 100644 index 5f89cba3c7..0000000000 Binary files a/OsmAnd/libs/tuprolog.jar and /dev/null differ diff --git a/OsmAnd/project.properties b/OsmAnd/project.properties index d769cee144..d693eb2a9f 100644 --- a/OsmAnd/project.properties +++ b/OsmAnd/project.properties @@ -26,3 +26,11 @@ android.library.reference.11=aarDependencies/com.android.support-support-v4-27.1 android.library.reference.12=aarDependencies/com.android.support-support-vector-drawable-27.1.0 android.library.reference.13=aarDependencies/com.android.support-animated-vector-drawable-27.1.0 android.library.reference.14=aarDependencies/com.android.support-multidex-1.0.1 +android.library.reference.15=aarDependencies/android.arch.lifecycle-runtime-1.1.0 +android.library.reference.16=aarDependencies/com.android.support-support-core-ui-27.1.0 +android.library.reference.17=aarDependencies/com.android.support-support-core-utils-27.1.0 +android.library.reference.18=aarDependencies/com.android.support-support-fragment-27.1.0 +android.library.reference.19=aarDependencies/android.arch.lifecycle-viewmodel-1.1.0 +android.library.reference.20=aarDependencies/android.arch.lifecycle-livedata-core-1.1.0 +android.library.reference.21=aarDependencies/com.android.support-transition-27.1.0 +android.library.reference.22=aarDependencies/com.android.support-support-media-compat-27.1.0 diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index a4be224c3d..c1f61c518c 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -73,6 +73,10 @@ ?attr/contextMenuButtonColor ?attr/selectableItemBackground + +