From 5009e9d1499594658c813830a2be39d5f032a9a1 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 25 Mar 2020 11:54:13 +0200 Subject: [PATCH] Export plugin items in osf --- OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java | 5 +++-- .../net/osmand/plus/settings/ExportProfileBottomSheet.java | 3 +-- .../net/osmand/plus/settings/ProfileAppearanceFragment.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java index 155490b307..bcdd7ab42e 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ImportHelper.java @@ -855,8 +855,9 @@ public class ImportHelper { iterator.remove(); } } - File pluginDir = new File(app.getAppPath(null), IndexConstants.PLUGINS_DIR + pluginItem.getPluginId()); - app.getSettingsHelper().exportPluginItems(pluginDir, null, items); + String pluginId = pluginItem.getPluginId(); + File pluginDir = new File(app.getAppPath(null), IndexConstants.PLUGINS_DIR + pluginId); + app.getSettingsHelper().exportSettings(pluginDir, "items", null, items, false); } }; List pluginItems = new ArrayList<>(pluginItem.getPluginDependentItems()); diff --git a/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java index cc445de01c..5ec9fdc822 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/ExportProfileBottomSheet.java @@ -42,7 +42,6 @@ import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickActionRegistry; -import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet; import net.osmand.plus.settings.ExportImportSettingsAdapter.Type; import net.osmand.plus.settings.bottomsheets.BasePreferenceBottomSheet; @@ -327,7 +326,7 @@ public class ExportProfileBottomSheet extends BasePreferenceBottomSheet { showExportProgressDialog(); File tempDir = getTempDir(); String fileName = profile.toHumanString(); - app.getSettingsHelper().exportSettings(tempDir, fileName, getSettingsExportListener(), prepareSettingsItemsForExport()); + app.getSettingsHelper().exportSettings(tempDir, fileName, getSettingsExportListener(), prepareSettingsItemsForExport(), true); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java index 2b945763d4..6432981c74 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ProfileAppearanceFragment.java @@ -770,7 +770,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment { tempDir.mkdirs(); } app.getSettingsHelper().exportSettings(tempDir, mode.getStringKey(), - getSettingsExportListener(), new SettingsHelper.ProfileSettingsItem(app, mode)); + getSettingsExportListener(), true, new SettingsHelper.ProfileSettingsItem(app, mode)); } }