From ed1f7bfc1a9a6af4c38fb177cc23fc0726e8f6b9 Mon Sep 17 00:00:00 2001 From: Ivan Dolgov Date: Fri, 30 Mar 2018 23:34:11 +0700 Subject: [PATCH 1/5] Added check to null pointer --- .../src/net/osmand/binary/BinaryMapDataObject.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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; } From 03ab0467be6b3ddf205925d19feae6cc2ea5d35e Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 30 Mar 2018 23:57:21 +0200 Subject: [PATCH 2/5] Add custom version --- OsmAnd/AndroidManifest-free.xml | 5 ----- OsmAnd/AndroidManifest-freecustom.xml | 24 ++++++++++++++++++++++++ OsmAnd/AndroidManifest-freedev.xml | 3 +++ OsmAnd/build.gradle | 7 +++++++ OsmAnd/res/values/styles.xml | 4 ++++ OsmAnd/src/net/osmand/plus/Version.java | 10 +++++----- 6 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 OsmAnd/AndroidManifest-freecustom.xml 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 @@ + ?attr/contextMenuButtonColor ?attr/selectableItemBackground + +