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); }