Small refactoring

This commit is contained in:
Victor Shcherb 2014-11-23 16:31:25 +01:00
parent 8b79a0c2b9
commit 9c8007e097
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,6 @@ public class OsMoControlDevice implements OsMoReactor {
this.plugin = plugin; this.plugin = plugin;
this.service = service; this.service = service;
this.tracker = tracker; this.tracker = tracker;
service.registerReactor(this);
} }
public JSONObject getBatteryLevel() throws JSONException { public JSONObject getBatteryLevel() throws JSONException {

View file

@ -62,6 +62,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
private OsMoPositionLayer olayer; private OsMoPositionLayer olayer;
protected MapActivity mapActivity; protected MapActivity mapActivity;
protected OsMoGroupsActivity groupsActivity; protected OsMoGroupsActivity groupsActivity;
protected OsMoControlDevice deviceControl;
private final static Log log = PlatformUtil.getLog(OsMoPlugin.class); 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); service = new OsMoService(app, this);
tracker = new OsMoTracker(service, app.getSettings().OSMO_SAVE_TRACK_INTERVAL, tracker = new OsMoTracker(service, app.getSettings().OSMO_SAVE_TRACK_INTERVAL,
app.getSettings().OSMO_AUTO_SEND_LOCATIONS); 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); groups = new OsMoGroups(this, service, tracker, app);
ApplicationMode.regWidget("osmo_control", (ApplicationMode[])null); ApplicationMode.regWidget("osmo_control", (ApplicationMode[])null);
} }