Update OsMoDroidPlugin.java

isActive true если включен мониторинг.
This commit is contained in:
fokin33 2013-07-26 07:36:53 -07:00
parent 03b1520035
commit 6d8cdf1e3b

View file

@ -214,7 +214,7 @@ public class OsMoDroidPlugin extends OsmandPlugin implements MonitoringInfoContr
@Override @Override
public void addMonitorActions(final ContextMenuAdapter qa, final MonitoringInfoControl li, final OsmandMapTileView view) { public void addMonitorActions(final ContextMenuAdapter qa, final MonitoringInfoControl li, final OsmandMapTileView view) {
boolean o = false; boolean o = true;
try { try {
o = mIRemoteService.isActive(); o = mIRemoteService.isActive();
} }
@ -222,7 +222,7 @@ public class OsMoDroidPlugin extends OsmandPlugin implements MonitoringInfoContr
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
final boolean off = o; final boolean off = !o;
qa.item(off ? R.string.osmodroid_mode_off : R.string.osmodroid_mode_on 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() { ).icon( off ? R.drawable.monitoring_rec_inactive : R.drawable.monitoring_rec_big).listen(new OnContextMenuClick() {