From f86d2931d6e8a5b4f661561c2be576726e1c373d Mon Sep 17 00:00:00 2001 From: fokin33 Date: Fri, 26 Jul 2013 05:53:03 -0700 Subject: [PATCH] Update OsMoDroidPlugin.java --- .../src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java b/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java index a323776e98..59e9bf9b2b 100644 --- a/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java @@ -214,7 +214,14 @@ public class OsMoDroidPlugin extends OsmandPlugin implements MonitoringInfoContr @Override public void addMonitorActions(final ContextMenuAdapter qa, final MonitoringInfoControl li, final OsmandMapTileView view) { - final boolean off = !view.getSettings().SAVE_TRACK_TO_GPX.get(); + final boolean off = false; + try { + off = mIRemoteService.isActive(); + } + catch(Exception e) { + log.error(e.getMessage(), e); + } + qa.item(off ? R.string.osmodroid_mode_off : R.string.osmodroid_mode_on ).icon( off ? R.drawable.monitoring_rec_inactive : R.drawable.monitoring_rec_big).listen(new OnContextMenuClick() {