Update OsMoDroidPlugin.java

This commit is contained in:
vshcherb 2013-07-26 15:49:53 +02:00
parent f3dd45b9b0
commit 03b1520035

View file

@ -214,14 +214,15 @@ 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) {
final boolean off = false; boolean o = false;
try { try {
off = mIRemoteService.isActive(); o = mIRemoteService.isActive();
} }
catch(Exception e) { catch(Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
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() {