From 9c8007e09772f0dcb16fbf68e4e90975acda923f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 23 Nov 2014 16:31:25 +0100 Subject: [PATCH] Small refactoring --- OsmAnd/src/net/osmand/plus/osmo/OsMoControlDevice.java | 1 - OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoControlDevice.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoControlDevice.java index 882a55cd21..3d2b6215db 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoControlDevice.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoControlDevice.java @@ -33,7 +33,6 @@ public class OsMoControlDevice implements OsMoReactor { this.plugin = plugin; this.service = service; this.tracker = tracker; - service.registerReactor(this); } public JSONObject getBatteryLevel() throws JSONException { diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java index 904e3de1fd..7d86e32d1d 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java @@ -62,6 +62,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer private OsMoPositionLayer olayer; protected MapActivity mapActivity; protected OsMoGroupsActivity groupsActivity; + protected OsMoControlDevice deviceControl; private final static Log log = PlatformUtil.getLog(OsMoPlugin.class); @@ -71,7 +72,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer service = new OsMoService(app, this); tracker = new OsMoTracker(service, app.getSettings().OSMO_SAVE_TRACK_INTERVAL, app.getSettings().OSMO_AUTO_SEND_LOCATIONS); - new OsMoControlDevice(app, this, service, tracker); + deviceControl = new OsMoControlDevice(app, this, service, tracker); groups = new OsMoGroups(this, service, tracker, app); ApplicationMode.regWidget("osmo_control", (ApplicationMode[])null); }