From 2f034ee92a41fec3d5b89a6d4825439b60809eb6 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 21 Dec 2014 13:04:15 +0100 Subject: [PATCH 1/9] comment fix for LocalIndexesFragment NPE --- OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index 9bb2ac5354..50bc1c7650 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -479,7 +479,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { //fixes issue when local files not shown after switching tabs - //TODO: But next line throws NPE in some circumstances when called from dashboard, so needs fixing, commented out for now + //Next line throws NPE in some circumstances when called from dashboard and listAdpater=null is not checked if (listAdapter != null && listAdapter.getGroupCount() == 0 && getDownloadActivity().getLocalIndexInfos().size() > 0) { for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()) { listAdapter.addLocalIndexInfo(info); From 109ba6bf2798b72c4703d353ad9c5c70fc0cfe5f Mon Sep 17 00:00:00 2001 From: ace shadow Date: Sun, 21 Dec 2014 13:22:32 +0100 Subject: [PATCH 2/9] Translated using Weblate (Slovak) Currently translated at 100.0% (1595 of 1595 strings) --- OsmAnd/res/values-sk/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index f12f7904ae..9e0490ec0f 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -2026,4 +2026,5 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda, Americký atlas ciest Bez smerovacích pravidiel verzie 1.9 Nepoužívať pravidlá výpočtu trasy zavedené vo verzii 1.9 + Oznamovať priechody pre chodcov From 5b0e04098e352aef80e9478b5f5fb393c940984a Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 21 Dec 2014 14:30:33 +0100 Subject: [PATCH 3/9] align order of cards --- OsmAnd/res/layout-large-land/dashboard.xml | 6 +++--- OsmAnd/res/layout/dashboard.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/layout-large-land/dashboard.xml b/OsmAnd/res/layout-large-land/dashboard.xml index 1e48cbdff9..73bd2231ca 100644 --- a/OsmAnd/res/layout-large-land/dashboard.xml +++ b/OsmAnd/res/layout-large-land/dashboard.xml @@ -32,14 +32,14 @@ @@ -67,7 +67,7 @@ diff --git a/OsmAnd/res/layout/dashboard.xml b/OsmAnd/res/layout/dashboard.xml index 41c50ed252..93038aec2a 100644 --- a/OsmAnd/res/layout/dashboard.xml +++ b/OsmAnd/res/layout/dashboard.xml @@ -49,14 +49,14 @@ From 24dbcbe8fb81116df2e230b75620cc0adb88c7fd Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sun, 21 Dec 2014 16:36:06 +0200 Subject: [PATCH 4/9] Remove neon --- OsmAnd/jni/Android.mk | 25 ------------------- OsmAnd/jni/Application.mk | 13 ---------- OsmAnd/jni/cpufeatures_proxy/Android.mk | 22 ---------------- OsmAnd/jni/cpufeatures_proxy/cpuCheck.cpp | 18 ------------- .../plus/render/NativeOsmandLibrary.java | 23 +---------------- 5 files changed, 1 insertion(+), 100 deletions(-) delete mode 100755 OsmAnd/jni/cpufeatures_proxy/Android.mk delete mode 100755 OsmAnd/jni/cpufeatures_proxy/cpuCheck.cpp diff --git a/OsmAnd/jni/Android.mk b/OsmAnd/jni/Android.mk index 4317cb6f72..087a3d1e25 100755 --- a/OsmAnd/jni/Android.mk +++ b/OsmAnd/jni/Android.mk @@ -17,30 +17,5 @@ endif # } LEGACY $(info OsmAnd makefiles: $(OSMAND_MAKEFILES)) -# Protect from previous builds -ifneq ($(TARGET_ARCH_ABI),armeabi-v7a) - OSMAND_BUILDING_NEON_LIBRARY := false -endif - -# OSMAND_FORCE_NEON_SUPPORT is used to force only NEON support on ARMv7a -ifeq ($(OSMAND_FORCE_NEON_SUPPORT),true) - ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) - OSMAND_BUILDING_NEON_LIBRARY := true - endif -endif - # By default, include makefiles only once include $(OSMAND_MAKEFILES) - -# If we're not asked not to support NEON and not asked to support only NEON ARMv7a, then -# make additional build -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) - ifneq ($(OSMAND_SKIP_NEON_SUPPORT),true) - ifneq ($(OSMAND_FORCE_NEON_SUPPORT),true) - - OSMAND_BUILDING_NEON_LIBRARY := true - include $(OSMAND_MAKEFILES) - - endif - endif -endif diff --git a/OsmAnd/jni/Application.mk b/OsmAnd/jni/Application.mk index 53da8d8016..64b92d8d9d 100755 --- a/OsmAnd/jni/Application.mk +++ b/OsmAnd/jni/Application.mk @@ -16,22 +16,9 @@ ifneq ($(filter mips,$(OSMAND_ARCHITECTURES_SET)),) endif ifneq ($(filter arm,$(OSMAND_ARCHITECTURES_SET)),) APP_ABI += armeabi armeabi-v7a - OSMAND_SKIP_NEON_SUPPORT := false - OSMAND_FORCE_NEON_SUPPORT := false else ifneq ($(filter armv7,$(OSMAND_ARCHITECTURES_SET)),) APP_ABI += armeabi-v7a - ifeq ($(filter armv7-neon,$(OSMAND_ARCHITECTURES_SET)),) - OSMAND_SKIP_NEON_SUPPORT := true - endif - OSMAND_FORCE_NEON_SUPPORT := false - endif - ifneq ($(filter armv7-neon,$(OSMAND_ARCHITECTURES_SET)),) - APP_ABI += armeabi-v7a - OSMAND_SKIP_NEON_SUPPORT := false - ifeq ($(filter armv7,$(OSMAND_ARCHITECTURES_SET)),) - OSMAND_FORCE_NEON_SUPPORT := true - endif endif endif diff --git a/OsmAnd/jni/cpufeatures_proxy/Android.mk b/OsmAnd/jni/cpufeatures_proxy/Android.mk deleted file mode 100755 index e26c2b7de2..0000000000 --- a/OsmAnd/jni/cpufeatures_proxy/Android.mk +++ /dev/null @@ -1,22 +0,0 @@ -# CPU Features library should not be built for NEON -ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := cpufeatures_proxy -ifneq ($(OSMAND_USE_PREBUILT),true) - LOCAL_SRC_FILES := \ - cpuCheck.cpp - LOCAL_STATIC_LIBRARIES := cpufeatures - include $(BUILD_SHARED_LIBRARY) -else - LOCAL_SRC_FILES := \ - ../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so - LOCAL_STATIC_LIBRARIES := cpufeatures - include $(PREBUILT_SHARED_LIBRARY) -endif - -$(call import-module,android/cpufeatures) - -endif diff --git a/OsmAnd/jni/cpufeatures_proxy/cpuCheck.cpp b/OsmAnd/jni/cpufeatures_proxy/cpuCheck.cpp deleted file mode 100755 index 5d895467eb..0000000000 --- a/OsmAnd/jni/cpufeatures_proxy/cpuCheck.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -JNIEXPORT jint JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_getCpuCount( JNIEnv* ienv, jobject obj) { - return android_getCpuCount(); -} - -JNIEXPORT jboolean JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_cpuHasNeonSupport( JNIEnv* ienv, jobject obj) { - return (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) == ANDROID_CPU_ARM_FEATURE_NEON) ? JNI_TRUE : JNI_FALSE; -} - -#ifdef __cplusplus -} -#endif diff --git a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java index de025d6d3d..194a8c812f 100644 --- a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java +++ b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java @@ -1,6 +1,5 @@ package net.osmand.plus.render; - import net.osmand.NativeLibrary; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; @@ -27,15 +26,6 @@ public class NativeOsmandLibrary extends NativeLibrary { return library; } } - public static void loadLibrary(String name) { - try { - System.out.println("Loading " + name); - System.loadLibrary(name); - } catch( UnsatisfiedLinkError e ) { - System.err.println("Failed to load '"+name + "':" + e); - throw e; - } - } public static NativeOsmandLibrary getLibrary(RenderingRulesStorage storage, OsmandApplication ctx) { if (!isLoaded()) { @@ -45,8 +35,6 @@ public class NativeOsmandLibrary extends NativeLibrary { try { log.debug("Loading native gnustl_shared..."); //$NON-NLS-1$ System.loadLibrary("gnustl_shared"); - log.debug("Loading native cpufeatures_proxy..."); //$NON-NLS-1$ - System.loadLibrary("cpufeatures_proxy"); if (android.os.Build.VERSION.SDK_INT >= 8) { log.debug("Loading jnigraphics, since Android >= 2.2 ..."); //$NON-NLS-1$ try { @@ -56,9 +44,8 @@ public class NativeOsmandLibrary extends NativeLibrary { log.debug("Failed to load jnigraphics: " + e); //$NON-NLS-1$ } } - final String libCpuSuffix = cpuHasNeonSupport() ? "_neon" : ""; log.debug("Loading native libraries..."); //$NON-NLS-1$ - loadOldCore(libCpuSuffix); + System.loadLibrary("osmand"); log.debug("Creating NativeOsmandLibrary instance..."); //$NON-NLS-1$ library = new NativeOsmandLibrary(false); log.debug("Initializing rendering rules storage..."); //$NON-NLS-1$ @@ -74,10 +61,6 @@ public class NativeOsmandLibrary extends NativeLibrary { return library; } - private static void loadOldCore(final String libCpuSuffix) { - System.loadLibrary("osmand" + libCpuSuffix); - } - public static boolean isSupported() { return isNativeSupported != null && isNativeSupported; @@ -116,8 +99,4 @@ public class NativeOsmandLibrary extends NativeLibrary { private static native RenderingGenerationResult generateRenderingDirect(RenderingContext rc, long searchResultHandler, Bitmap bitmap, RenderingRuleSearchRequest render); - - public static native int getCpuCount(); - public static native boolean cpuHasNeonSupport(); - } From 17a720817936e50ad49865b4d246837133dccc9f Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Sun, 21 Dec 2014 15:59:20 +0100 Subject: [PATCH 5/9] Translated using Weblate (Italian) Currently translated at 100.0% (1595 of 1595 strings) --- OsmAnd/res/values-it/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 97a9463072..aa00332615 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -2043,4 +2043,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Pedonale Mostra i passaggi a livello Mostra gli attraversamenti pedonali + Annuncia gli attraversamenti pedonali From 580af993306b1ce0a099983f01eb0d27b65ba973 Mon Sep 17 00:00:00 2001 From: Lu Ca Date: Sun, 21 Dec 2014 16:24:35 +0100 Subject: [PATCH 6/9] Translated using Weblate (Sardinian) Currently translated at 100.0% (1595 of 1595 strings) --- OsmAnd/res/values-sc/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index b867e89a32..15ebddfec4 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -1817,4 +1817,5 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres Pedonale Ammustra sas rugradas ferroviàrias Ammustra sas istrìscias pedonales + Annùntzia sos atraessamentos pedonales From 847201f76204582b883c8c395c9b3fbba0644b4b Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 21 Dec 2014 17:47:53 +0100 Subject: [PATCH 7/9] align menu order to how we had it --- .../plus/activities/SettingsNavigationActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 9d790f053e..0b89027e4a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -334,14 +334,14 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { return true; } else if (preference == speakAlarms) { showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), - getString(R.string.speak_pedestrian), getString(R.string.speak_cameras), - getString(R.string.speak_speed_limit), + getString(R.string.speak_pedestrian), getString(R.string.speak_speed_limit), + getString(R.string.speak_cameras), getString(R.string.announce_gpx_waypoints), getString(R.string.speak_favorites), getString(R.string.speak_poi)}, new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, - settings.SPEAK_PEDESTRIAN, settings.SPEAK_SPEED_CAMERA, - settings.SPEAK_SPEED_LIMIT, + settings.SPEAK_PEDESTRIAN, settings.SPEAK_SPEED_LIMIT, + settings.SPEAK_SPEED_CAMERA, settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES, settings.ANNOUNCE_NEARBY_POI}, preference.getTitle()); return true; } From 6944aa40c6c8c323a7ec1af07a024160b6fd41a2 Mon Sep 17 00:00:00 2001 From: Lu Ca Date: Sun, 21 Dec 2014 16:27:44 +0100 Subject: [PATCH 8/9] Translated using Weblate (Sardinian) Currently translated at 100.0% (1595 of 1595 strings) --- OsmAnd/res/values-sc/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 15ebddfec4..c86f22ff72 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -1813,8 +1813,8 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres Atlante de sas istradas americanas No impreare su càlculu de s\'àndala v1.9 No impreare su càlculu de s\'àndala v1.9 - Ferrovia - Pedonale + Atraessamentu de sa ferrovia + Atraessamentu pedonale Ammustra sas rugradas ferroviàrias Ammustra sas istrìscias pedonales Annùntzia sos atraessamentos pedonales From 455b872a3c6b59cfbec792630aac62eaf3372fc5 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 21 Dec 2014 17:53:00 +0100 Subject: [PATCH 9/9] code cosmetics --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index f57239dcc7..d8c5e0551f 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -826,8 +826,8 @@ public class OsmandSettings { public final OsmandPreference SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache(); public final OsmandPreference SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache(); public final OsmandPreference SPEAK_PEDESTRIAN = new BooleanPreference("speak_pedestrian", true).makeProfile().cache(); - public final OsmandPreference SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache(); public final OsmandPreference SPEAK_SPEED_LIMIT = new BooleanPreference("speak_speed_limit", true).makeProfile().cache(); + public final OsmandPreference SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache(); public final OsmandPreference GPX_ROUTE_CALC_OSMAND_PARTS = new BooleanPreference("gpx_routing_calculate_osmand_route", true).makeGlobal().cache(); public final OsmandPreference GPX_CALCULATE_RTEPT = new BooleanPreference("gpx_routing_calculate_rtept", true).makeGlobal().cache();