Merge branch 'master' of github.com:osmandapp/Osmand
This commit is contained in:
commit
169127d482
13 changed files with 17 additions and 113 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
|
@ -1,18 +0,0 @@
|
|||
#include <jni.h>
|
||||
#include <cpu-features.h>
|
||||
|
||||
#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
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:name="net.osmand.plus.dashboard.DashUpdatesFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashFavoritesFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:name="net.osmand.plus.dashboard.DashFavoritesFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashAudioVideoNotesFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:name="net.osmand.plus.dashboard.DashAudioVideoNotesFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashUpdatesFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
|
|
@ -49,14 +49,14 @@
|
|||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:name="net.osmand.plus.dashboard.DashUpdatesFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashDownloadMapsFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:name="net.osmand.plus.dashboard.DashDownloadMapsFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashUpdatesFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
|
|
@ -2043,4 +2043,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="traffic_warning_pedestrian">Pedonale</string>
|
||||
<string name="show_railway_warnings">Mostra i passaggi a livello</string>
|
||||
<string name="show_pedestrian_warnings">Mostra gli attraversamenti pedonali</string>
|
||||
<string name="speak_pedestrian">Annuncia gli attraversamenti pedonali</string>
|
||||
</resources>
|
||||
|
|
|
@ -1813,8 +1813,9 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
|
|||
<string name="rendering_value_americanRoadAtlas_name">Atlante de sas istradas americanas</string>
|
||||
<string name="routing_attr_no_new_routing_name">No impreare su càlculu de s\'àndala v1.9</string>
|
||||
<string name="routing_attr_no_new_routing_description">No impreare su càlculu de s\'àndala v1.9</string>
|
||||
<string name="traffic_warning_railways">Ferrovia</string>
|
||||
<string name="traffic_warning_pedestrian">Pedonale</string>
|
||||
<string name="traffic_warning_railways">Atraessamentu de sa ferrovia</string>
|
||||
<string name="traffic_warning_pedestrian">Atraessamentu pedonale</string>
|
||||
<string name="show_railway_warnings">Ammustra sas rugradas ferroviàrias</string>
|
||||
<string name="show_pedestrian_warnings">Ammustra sas istrìscias pedonales</string>
|
||||
<string name="speak_pedestrian">Annùntzia sos atraessamentos pedonales</string>
|
||||
</resources>
|
||||
|
|
|
@ -2026,4 +2026,5 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="rendering_value_americanRoadAtlas_name">Americký atlas ciest</string>
|
||||
<string name="routing_attr_no_new_routing_name">Bez smerovacích pravidiel verzie 1.9</string>
|
||||
<string name="routing_attr_no_new_routing_description">Nepoužívať pravidlá výpočtu trasy zavedené vo verzii 1.9</string>
|
||||
<string name="speak_pedestrian">Oznamovať priechody pre chodcov</string>
|
||||
</resources>
|
||||
|
|
|
@ -826,8 +826,8 @@ public class OsmandSettings {
|
|||
public final OsmandPreference<Boolean> SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SPEAK_PEDESTRIAN = new BooleanPreference("speak_pedestrian", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SPEAK_SPEED_LIMIT = new BooleanPreference("speak_speed_limit", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache();
|
||||
|
||||
public final OsmandPreference<Boolean> GPX_ROUTE_CALC_OSMAND_PARTS = new BooleanPreference("gpx_routing_calculate_osmand_route", true).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> GPX_CALCULATE_RTEPT = new BooleanPreference("gpx_routing_calculate_rtept", true).makeGlobal().cache();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue