Drop distance calc plugin. Hide Mapillary plugin from settings.
This commit is contained in:
parent
73221f93c5
commit
9b0fcb5855
3 changed files with 24 additions and 2 deletions
|
@ -86,6 +86,10 @@ public abstract class OsmandPlugin {
|
|||
return active;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean needsInstallation() {
|
||||
return installURL != null;
|
||||
}
|
||||
|
@ -127,7 +131,10 @@ public abstract class OsmandPlugin {
|
|||
public static void initPlugins(OsmandApplication app) {
|
||||
OsmandSettings settings = app.getSettings();
|
||||
Set<String> enabledPlugins = settings.getEnabledPlugins();
|
||||
|
||||
allPlugins.add(new MapillaryPlugin(app));
|
||||
enabledPlugins.add(MapillaryPlugin.ID);
|
||||
|
||||
allPlugins.add(new OsmandRasterMapsPlugin(app));
|
||||
allPlugins.add(new OsmandMonitoringPlugin(app));
|
||||
// allPlugins.add(new OsMoPlugin(app));
|
||||
|
@ -141,7 +148,7 @@ public abstract class OsmandPlugin {
|
|||
// checkMarketPlugin(app, new RoutePointsPlugin(app), false /*FIXME*/, RoutePointsPlugin.ROUTE_POINTS_PLUGIN_COMPONENT, null);
|
||||
allPlugins.add(new AudioVideoNotesPlugin(app));
|
||||
checkMarketPlugin(app, new ParkingPositionPlugin(app), false, ParkingPositionPlugin.PARKING_PLUGIN_COMPONENT, null);
|
||||
allPlugins.add(new DistanceCalculatorPlugin(app));
|
||||
//allPlugins.add(new DistanceCalculatorPlugin(app));
|
||||
allPlugins.add(new AccessibilityPlugin(app));
|
||||
allPlugins.add(new OsmEditingPlugin(app));
|
||||
allPlugins.add(new OsmandDevelopmentPlugin(app));
|
||||
|
@ -303,6 +310,16 @@ public abstract class OsmandPlugin {
|
|||
return allPlugins;
|
||||
}
|
||||
|
||||
public static List<OsmandPlugin> getVisiblePlugins() {
|
||||
List<OsmandPlugin> list = new ArrayList<>(allPlugins.size());
|
||||
for (OsmandPlugin p : allPlugins) {
|
||||
if (p.isVisible()) {
|
||||
list.add(p);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<OsmandPlugin> getEnabledPlugins() {
|
||||
ArrayList<OsmandPlugin> lst = new ArrayList<OsmandPlugin>(allPlugins.size());
|
||||
for (OsmandPlugin p : allPlugins) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PluginsActivity extends OsmandListActivity {
|
|||
protected class PluginsListAdapter extends ArrayAdapter<OsmandPlugin> {
|
||||
public PluginsListAdapter() {
|
||||
super(PluginsActivity.this, R.layout.plugins_list_item,
|
||||
OsmandPlugin.getAvailablePlugins());
|
||||
OsmandPlugin.getVisiblePlugins());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -56,6 +56,11 @@ public class MapillaryPlugin extends OsmandPlugin {
|
|||
settings = app.getSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_action_mapillary;
|
||||
|
|
Loading…
Reference in a new issue