Merge branch 'r3.9'
This commit is contained in:
commit
aa065d7724
2 changed files with 6 additions and 13 deletions
|
@ -277,26 +277,19 @@ public abstract class OsmandPlugin {
|
||||||
|
|
||||||
public static void initPlugins(@NonNull OsmandApplication app) {
|
public static void initPlugins(@NonNull OsmandApplication app) {
|
||||||
Set<String> enabledPlugins = app.getSettings().getEnabledPlugins();
|
Set<String> enabledPlugins = app.getSettings().getEnabledPlugins();
|
||||||
|
|
||||||
allPlugins.clear();
|
allPlugins.clear();
|
||||||
|
enablePluginByDefault(app, enabledPlugins, new WikipediaPlugin(app));
|
||||||
enableHiddenPlugin(app, enabledPlugins, new WikipediaPlugin(app));
|
|
||||||
|
|
||||||
allPlugins.add(new MapillaryPlugin(app));
|
|
||||||
allPlugins.add(new OsmandRasterMapsPlugin(app));
|
allPlugins.add(new OsmandRasterMapsPlugin(app));
|
||||||
allPlugins.add(new OsmandMonitoringPlugin(app));
|
allPlugins.add(new OsmandMonitoringPlugin(app));
|
||||||
checkMarketPlugin(app, enabledPlugins, new SRTMPlugin(app));
|
checkMarketPlugin(app, enabledPlugins, new SRTMPlugin(app));
|
||||||
|
|
||||||
// ? questionable - definitely not market plugin
|
|
||||||
// checkMarketPlugin(app, enabledPlugins, new TouringViewPlugin(app), false, TouringViewPlugin.COMPONENT, null);
|
|
||||||
checkMarketPlugin(app, enabledPlugins, new NauticalMapsPlugin(app));
|
checkMarketPlugin(app, enabledPlugins, new NauticalMapsPlugin(app));
|
||||||
checkMarketPlugin(app, enabledPlugins, new SkiMapsPlugin(app));
|
checkMarketPlugin(app, enabledPlugins, new SkiMapsPlugin(app));
|
||||||
|
|
||||||
allPlugins.add(new AudioVideoNotesPlugin(app));
|
allPlugins.add(new AudioVideoNotesPlugin(app));
|
||||||
checkMarketPlugin(app, enabledPlugins, new ParkingPositionPlugin(app));
|
checkMarketPlugin(app, enabledPlugins, new ParkingPositionPlugin(app));
|
||||||
allPlugins.add(new AccessibilityPlugin(app));
|
|
||||||
allPlugins.add(new OsmEditingPlugin(app));
|
allPlugins.add(new OsmEditingPlugin(app));
|
||||||
allPlugins.add(new OpenPlaceReviewsPlugin(app));
|
enablePluginByDefault(app, enabledPlugins, new OpenPlaceReviewsPlugin(app));
|
||||||
|
enablePluginByDefault(app, enabledPlugins, new MapillaryPlugin(app));
|
||||||
|
allPlugins.add(new AccessibilityPlugin(app));
|
||||||
allPlugins.add(new OsmandDevelopmentPlugin(app));
|
allPlugins.add(new OsmandDevelopmentPlugin(app));
|
||||||
|
|
||||||
loadCustomPlugins(app);
|
loadCustomPlugins(app);
|
||||||
|
@ -388,7 +381,7 @@ public abstract class OsmandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void enableHiddenPlugin(@NonNull OsmandApplication app, @NonNull Set<String> enabledPlugins, @NonNull OsmandPlugin plugin) {
|
private static void enablePluginByDefault(@NonNull OsmandApplication app, @NonNull Set<String> enabledPlugins, @NonNull OsmandPlugin plugin) {
|
||||||
allPlugins.add(plugin);
|
allPlugins.add(plugin);
|
||||||
if (!enabledPlugins.contains(plugin.getId()) && !app.getSettings().getPlugins().contains("-" + plugin.getId())) {
|
if (!enabledPlugins.contains(plugin.getId()) && !app.getSettings().getPlugins().contains("-" + plugin.getId())) {
|
||||||
enabledPlugins.add(plugin.getId());
|
enabledPlugins.add(plugin.getId());
|
||||||
|
|
|
@ -654,7 +654,7 @@ public class OsmandSettings {
|
||||||
public static final String NUMBER_OF_FREE_DOWNLOADS_ID = "free_downloads_v3";
|
public static final String NUMBER_OF_FREE_DOWNLOADS_ID = "free_downloads_v3";
|
||||||
|
|
||||||
// this value string is synchronized with settings_pref.xml preference name
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
private final OsmandPreference<String> PLUGINS = new StringPreference(this, "enabled_plugins", MapillaryPlugin.ID + "," + OpenPlaceReviewsPlugin.ID).makeGlobal().makeShared();
|
private final OsmandPreference<String> PLUGINS = new StringPreference(this, "enabled_plugins", "").makeGlobal().makeShared();
|
||||||
|
|
||||||
public Set<String> getEnabledPlugins() {
|
public Set<String> getEnabledPlugins() {
|
||||||
String plugs = PLUGINS.get();
|
String plugs = PLUGINS.get();
|
||||||
|
|
Loading…
Reference in a new issue