Finishing if plugins disabled

This commit is contained in:
GaidamakUA 2016-04-18 18:24:30 +03:00
parent 2c58bd0582
commit d7afaa28d1

View file

@ -250,6 +250,7 @@ public class ExternalApiHelper {
AudioVideoNotesPlugin plugin = OsmandPlugin.getPlugin(AudioVideoNotesPlugin.class);
if (plugin == null) {
resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE;
finish = true;
} else {
if (API_CMD_STOP_AV_REC.equals(cmd)) {
plugin.stopRecording(mapActivity, false);
@ -361,6 +362,7 @@ public class ExternalApiHelper {
OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
if (plugin == null) {
resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE;
finish = true;
} else {
plugin.startGPXMonitoring(null);
}
@ -371,6 +373,7 @@ public class ExternalApiHelper {
OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
if (plugin == null) {
resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE;
finish = true;
} else {
plugin.stopRecording();
}