Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
701f251d6c
19 changed files with 108 additions and 29 deletions
|
@ -157,14 +157,15 @@ public class BinaryMapDataObject {
|
||||||
|
|
||||||
public int getSimpleLayer(){
|
public int getSimpleLayer(){
|
||||||
if(mapIndex != null) {
|
if(mapIndex != null) {
|
||||||
for (int i = 0; i < additionalTypes.length; i++) {
|
if (additionalTypes != null) {
|
||||||
if (mapIndex.positiveLayers.contains(additionalTypes[i])) {
|
for (int i = 0; i < additionalTypes.length; i++) {
|
||||||
return 1;
|
if (mapIndex.positiveLayers.contains(additionalTypes[i])) {
|
||||||
} else if (mapIndex.negativeLayers.contains(additionalTypes[i])) {
|
return 1;
|
||||||
return -1;
|
} else if (mapIndex.negativeLayers.contains(additionalTypes[i])) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
5
OsmAnd/.gitignore
vendored
5
OsmAnd/.gitignore
vendored
|
@ -6,6 +6,11 @@ gradlew.bat
|
||||||
aarDependencies
|
aarDependencies
|
||||||
libs/android*.jar
|
libs/android*.jar
|
||||||
libs/com.*.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/
|
valgrind/
|
||||||
bin/
|
bin/
|
||||||
dist/
|
dist/
|
||||||
|
|
|
@ -10,11 +10,6 @@
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.facebook.sdk.ApplicationId"
|
android:name="com.facebook.sdk.ApplicationId"
|
||||||
android:resource="@string/facebook_app_id"/>
|
android:resource="@string/facebook_app_id"/>
|
||||||
<activity
|
|
||||||
android:name="com.facebook.FacebookActivity"
|
|
||||||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
|
||||||
android:label="@string/app_name_free"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="net.osmand.plus.activities.MapActivity"
|
android:name="net.osmand.plus.activities.MapActivity"
|
||||||
android:theme="@style/FirstSplashScreenFree"
|
android:theme="@style/FirstSplashScreenFree"
|
||||||
|
|
25
OsmAnd/AndroidManifest-freecustom.xml
Normal file
25
OsmAnd/AndroidManifest-freecustom.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:icon="@mipmap/icon_free"
|
||||||
|
android:label="@string/app_name_free"
|
||||||
|
tools:replace="android:icon">
|
||||||
|
<meta-data
|
||||||
|
android:name="com.facebook.sdk.ApplicationId"
|
||||||
|
android:resource="@string/facebook_app_id"/>
|
||||||
|
<activity
|
||||||
|
android:name="net.osmand.plus.activities.MapActivity"
|
||||||
|
android:theme="@style/FirstSplashScreenCustom"
|
||||||
|
tools:replace="android:theme"/>
|
||||||
|
<service
|
||||||
|
android:name="net.osmand.plus.NavigationService"
|
||||||
|
android:process="net.osmand.freecustom"
|
||||||
|
tools:replace="android:process"/>
|
||||||
|
<provider
|
||||||
|
android:name="android.support.v4.content.FileProvider"
|
||||||
|
android:authorities="net.osmand.freecustom.fileprovider"
|
||||||
|
tools:replace="android:authorities"/>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
|
@ -5,6 +5,9 @@
|
||||||
<application
|
<application
|
||||||
android:icon="@mipmap/icon_nightly"
|
android:icon="@mipmap/icon_nightly"
|
||||||
tools:replace="android:icon">
|
tools:replace="android:icon">
|
||||||
|
<meta-data
|
||||||
|
android:name="com.facebook.sdk.ApplicationId"
|
||||||
|
android:resource="@string/facebook_app_id"/>
|
||||||
<activity
|
<activity
|
||||||
android:name="net.osmand.plus.activities.MapActivity"
|
android:name="net.osmand.plus.activities.MapActivity"
|
||||||
android:theme="@style/FirstSplashScreenFreeDev"
|
android:theme="@style/FirstSplashScreenFreeDev"
|
||||||
|
|
|
@ -95,6 +95,9 @@ android {
|
||||||
freedev {
|
freedev {
|
||||||
manifest.srcFile "AndroidManifest-freedev.xml"
|
manifest.srcFile "AndroidManifest-freedev.xml"
|
||||||
}
|
}
|
||||||
|
freecustom {
|
||||||
|
manifest.srcFile "AndroidManifest-freecustom.xml"
|
||||||
|
}
|
||||||
|
|
||||||
legacy {
|
legacy {
|
||||||
jniLibs.srcDirs = ["libgnustl"]
|
jniLibs.srcDirs = ["libgnustl"]
|
||||||
|
@ -147,6 +150,10 @@ android {
|
||||||
applicationId "net.osmand"
|
applicationId "net.osmand"
|
||||||
resConfig "en"
|
resConfig "en"
|
||||||
}
|
}
|
||||||
|
freecustom {
|
||||||
|
dimension "version"
|
||||||
|
applicationId "net.osmand.freecustom"
|
||||||
|
}
|
||||||
full {
|
full {
|
||||||
dimension "version"
|
dimension "version"
|
||||||
applicationId "net.osmand.plus"
|
applicationId "net.osmand.plus"
|
||||||
|
@ -186,6 +193,7 @@ android {
|
||||||
signingConfig signingConfigs.publishing
|
signingConfig signingConfigs.publishing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def replaceNoTranslate(line) {
|
def replaceNoTranslate(line) {
|
||||||
|
@ -198,12 +206,6 @@ def replaceNoTranslate(line) {
|
||||||
if (line.contains("\"app_edition\"") && System.getenv("APP_EDITION")) {
|
if (line.contains("\"app_edition\"") && System.getenv("APP_EDITION")) {
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_EDITION") + "<")
|
return line.replaceAll(">[^<]*<", ">" + 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("APK_VERSION_SUFFIX") + "</")
|
|
||||||
// }
|
|
||||||
if (line.contains("\"versionFeatures\"") && System.getenv("APP_FEATURES")) {
|
if (line.contains("\"versionFeatures\"") && System.getenv("APP_FEATURES")) {
|
||||||
return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_FEATURES") + "<")
|
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:appcompat-v7:27.1.0'
|
||||||
compile 'com.android.support:design:27.1.0'
|
compile 'com.android.support:design:27.1.0'
|
||||||
compile 'com.android.support:customtabs: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"
|
legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar"
|
||||||
qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar"
|
||||||
qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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.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.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.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
|
||||||
|
|
|
@ -73,6 +73,10 @@
|
||||||
<item name="android:textColor">?attr/contextMenuButtonColor</item>
|
<item name="android:textColor">?attr/contextMenuButtonColor</item>
|
||||||
<item name="android:background">?attr/selectableItemBackground</item>
|
<item name="android:background">?attr/selectableItemBackground</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="FirstSplashScreenCustom" parent="OsmandLightTheme.NoActionbar">
|
||||||
|
<item name="android:windowBackground">@drawable/first_splash_screen_free</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="FirstSplashScreenPlus" parent="OsmandLightTheme.NoActionbar">
|
<style name="FirstSplashScreenPlus" parent="OsmandLightTheme.NoActionbar">
|
||||||
<item name="android:windowBackground">@drawable/first_splash_screen_plus</item>
|
<item name="android:windowBackground">@drawable/first_splash_screen_plus</item>
|
||||||
|
|
|
@ -31,6 +31,23 @@ public class PlatformUtil {
|
||||||
this.fullName = name;
|
this.fullName = name;
|
||||||
this.name = fullName.substring(fullName.lastIndexOf('.') + 1);
|
this.name = fullName.substring(fullName.lastIndexOf('.') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void trace(Object message) {
|
||||||
|
if(isTraceEnabled()){
|
||||||
|
android.util.Log.d(TAG, name + " " + message); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void trace(Object message, Throwable t) {
|
||||||
|
if(isTraceEnabled()){
|
||||||
|
android.util.Log.d(TAG, name + " " + message, t); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void debug(Object message) {
|
public void debug(Object message) {
|
||||||
if(isDebugEnabled()){
|
if(isDebugEnabled()){
|
||||||
|
@ -87,12 +104,19 @@ public class PlatformUtil {
|
||||||
android.util.Log.i(TAG, name + " " + message, t); //$NON-NLS-1$
|
android.util.Log.i(TAG, name + " " + message, t); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTraceEnabled() {
|
||||||
|
return android.util.Log.isLoggable(TAG, android.util.Log.VERBOSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDebugEnabled() {
|
public boolean isDebugEnabled() {
|
||||||
// For debur purposes always true
|
// For debur purposes always true
|
||||||
// return android.util.Log.isLoggable(NATIVE_TAG, android.util.Log.DEBUG);
|
return android.util.Log.isLoggable(TAG, android.util.Log.DEBUG);
|
||||||
return true;
|
// return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class Version {
|
||||||
private final String appName;
|
private final String appName;
|
||||||
private final static String FREE_VERSION_NAME = "net.osmand";
|
private final static String FREE_VERSION_NAME = "net.osmand";
|
||||||
private final static String FREE_DEV_VERSION_NAME = "net.osmand.dev";
|
private final static String FREE_DEV_VERSION_NAME = "net.osmand.dev";
|
||||||
private final static String SHERPAFY_VERSION_NAME = "net.osmand.sherpafy";
|
private final static String FREE_CUSTOM_VERSION_NAME = "net.osmand.freecustom";
|
||||||
private final static String UTM_REF = "&referrer=utm_source%3Dosmand";
|
private final static String UTM_REF = "&referrer=utm_source%3Dosmand";
|
||||||
|
|
||||||
public static boolean isGpsStatusEnabled(OsmandApplication ctx) {
|
public static boolean isGpsStatusEnabled(OsmandApplication ctx) {
|
||||||
|
@ -57,9 +57,6 @@ public class Version {
|
||||||
return ctx.getString(R.string.versionFeatures).contains("+play_market");
|
return ctx.getString(R.string.versionFeatures).contains("+play_market");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSherpafy(OsmandApplication ctx) {
|
|
||||||
return ctx.getPackageName().equals(SHERPAFY_VERSION_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Version(OsmandApplication ctx) {
|
private Version(OsmandApplication ctx) {
|
||||||
String appVersion = "";
|
String appVersion = "";
|
||||||
|
@ -116,7 +113,10 @@ public class Version {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isFreeVersion(OsmandApplication ctx){
|
public static boolean isFreeVersion(OsmandApplication ctx){
|
||||||
return ctx.getPackageName().equals(FREE_VERSION_NAME) || ctx.getPackageName().equals(FREE_DEV_VERSION_NAME);
|
return ctx.getPackageName().equals(FREE_VERSION_NAME) ||
|
||||||
|
ctx.getPackageName().equals(FREE_DEV_VERSION_NAME) ||
|
||||||
|
ctx.getPackageName().equals(FREE_CUSTOM_VERSION_NAME)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPaidVersion(OsmandApplication ctx) {
|
public static boolean isPaidVersion(OsmandApplication ctx) {
|
||||||
|
|
|
@ -7,10 +7,10 @@ buildscript {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.+'
|
//classpath 'com.android.tools.build:gradle:2.+'
|
||||||
|
classpath 'com.android.tools.build:gradle:3.1.+'
|
||||||
classpath 'com.google.gms:google-services:3.0.0'
|
classpath 'com.google.gms:google-services:3.0.0'
|
||||||
classpath 'com.github.ksoichiro:gradle-eclipse-aar-plugin:0.3.1'
|
classpath 'com.github.ksoichiro:gradle-eclipse-aar-plugin:0.3.1'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply plugin: 'com.github.ksoichiro.eclipse.aar'
|
apply plugin: 'com.github.ksoichiro.eclipse.aar'
|
||||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
|
||||||
|
|
Loading…
Reference in a new issue