diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/ExportSettingsType.java b/OsmAnd/src/net/osmand/plus/settings/backend/ExportSettingsType.java index bd7e8e9f4e..4f8420cb11 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/ExportSettingsType.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/ExportSettingsType.java @@ -9,5 +9,6 @@ public enum ExportSettingsType { CUSTOM_ROUTING, AVOID_ROADS, TRACKS, - MULTIMEDIA_NOTES + MULTIMEDIA_NOTES, + GLOBAL } diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java b/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java index 6d68929de6..88a9fbc797 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/backup/SettingsHelper.java @@ -576,6 +576,7 @@ public class SettingsHelper { List multimediaFilesList = new ArrayList<>(); List tracksFilesList = new ArrayList<>(); List avoidRoads = new ArrayList<>(); + List globalSettingsItems = new ArrayList<>(); for (SettingsItem item : settingsItems) { switch (item.getType()) { case PROFILE: @@ -625,6 +626,9 @@ public class SettingsHelper { avoidRoads.addAll(avoidRoadsItem.getItems()); } break; + case GLOBAL: + globalSettingsItems.add((GlobalSettingsItem) item); + break; default: break; } @@ -657,6 +661,9 @@ public class SettingsHelper { if (!tracksFilesList.isEmpty()) { settingsToOperate.put(ExportSettingsType.TRACKS, tracksFilesList); } + if (!globalSettingsItems.isEmpty()) { + settingsToOperate.put(ExportSettingsType.GLOBAL, globalSettingsItems); + } return settingsToOperate; } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportImportSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportImportSettingsAdapter.java index eac1917850..acb9da8ee0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ExportImportSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ExportImportSettingsAdapter.java @@ -31,6 +31,7 @@ import net.osmand.plus.render.RenderingIcons; import net.osmand.plus.settings.backend.ApplicationMode; import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean; import net.osmand.plus.settings.backend.ExportSettingsType; +import net.osmand.plus.settings.backend.backup.GlobalSettingsItem; import net.osmand.util.Algorithms; import net.osmand.view.ThreeStateCheckbox; @@ -262,6 +263,12 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { setupIcon(icon, R.drawable.ic_action_route_distance, itemSelected); subText.setVisibility(View.GONE); break; + case GLOBAL: + String name = ((GlobalSettingsItem) currentItem).getPublicName(app); + title.setText(name); + setupIcon(icon, R.drawable.ic_action_settings, itemSelected); + subText.setVisibility(View.GONE); + break; default: return child; } @@ -338,6 +345,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { return R.string.shared_string_tracks; case MULTIMEDIA_NOTES: return R.string.audionotes_plugin_name; + case GLOBAL: + return R.string.general_settings_2; default: return R.string.access_empty_list; }