diff options
author | Chumva <faiver.unknown@gmail.com> | 2019-10-16 16:08:38 +0300 |
---|---|---|
committer | Chumva <faiver.unknown@gmail.com> | 2019-10-16 16:08:38 +0300 |
commit | 9b1d9e23a5b3eca060b652aeb133316b9214bfb8 (patch) | |
tree | 4bda0a6d98b7eaaf4c0e424c5edb2b393d665d06 | |
parent | e486fb34c95512723efb97807c9f9b9ca83e390e (diff) | |
download | Osmand-9b1d9e23a5b3eca060b652aeb133316b9214bfb8.tar.gz |
Add safe mode pref to development plugin settings
-rw-r--r-- | OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java index 432fb53164..996a1be09b 100644 --- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java @@ -17,6 +17,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.SettingsBaseActivity; +import net.osmand.plus.render.NativeOsmandLibrary; import net.osmand.util.SunriseSunset; import java.text.SimpleDateFormat; @@ -37,6 +38,15 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity { cat.addPreference(createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr)); + CheckBoxPreference nativeCheckbox = createCheckBoxPreference(settings.SAFE_MODE, R.string.safe_mode, + R.string.safe_mode_description); + // disable the checkbox if the library cannot be used + if ((NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) || settings.NATIVE_RENDERING_FAILED.get()) { + nativeCheckbox.setEnabled(false); + nativeCheckbox.setChecked(true); + } + cat.addPreference(nativeCheckbox); + PreferenceCategory navigation = new PreferenceCategory(this); navigation.setTitle(R.string.routing_settings); cat.addPreference(navigation); |