Fix enabling plugins via aidl in settings

This commit is contained in:
Chumva 2019-05-02 13:02:01 +03:00
parent 24f604ec19
commit 1fa2a75ff9

View file

@ -308,7 +308,7 @@ public class OsmAndAppCustomization {
if (params.getNewState() == 0) { if (params.getNewState() == 0) {
for (OsmandPlugin plugin : OsmandPlugin.getEnabledPlugins()) { for (OsmandPlugin plugin : OsmandPlugin.getEnabledPlugins()) {
if (plugin.getId().equals(params.getPluginId())) { if (plugin.getId().equals(params.getPluginId())) {
plugin.setActive(false); OsmandPlugin.enablePlugin(null, app, plugin, false);
} }
} }
return true; return true;
@ -317,7 +317,7 @@ public class OsmAndAppCustomization {
if (params.getNewState() == 1) { if (params.getNewState() == 1) {
for (OsmandPlugin plugin : OsmandPlugin.getAvailablePlugins()) { for (OsmandPlugin plugin : OsmandPlugin.getAvailablePlugins()) {
if (plugin.getId().equals(params.getPluginId())) { if (plugin.getId().equals(params.getPluginId())) {
plugin.setActive(true); OsmandPlugin.enablePlugin(null, app, plugin, true);
} }
} }
return true; return true;