diff --git a/OsmAnd-api/src/net/osmand/aidlapi/profile/ExportSettingsType.aidl b/OsmAnd-api/src/net/osmand/aidlapi/profile/AExportSettingsType.aidl similarity index 54% rename from OsmAnd-api/src/net/osmand/aidlapi/profile/ExportSettingsType.aidl rename to OsmAnd-api/src/net/osmand/aidlapi/profile/AExportSettingsType.aidl index 13ac783db1..99c59bba2a 100644 --- a/OsmAnd-api/src/net/osmand/aidlapi/profile/ExportSettingsType.aidl +++ b/OsmAnd-api/src/net/osmand/aidlapi/profile/AExportSettingsType.aidl @@ -1,3 +1,3 @@ package net.osmand.aidlapi.profile; -parcelable ExportSettingsType; \ No newline at end of file +parcelable AExportSettingsType; \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index e1aecf5500..6329d5db2e 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -2352,11 +2352,11 @@ public class OsmandAidlApi { } List settingsItems = new ArrayList<>(); settingsItems.add(new SettingsHelper.ProfileSettingsItem(app, appMode)); - File tempDir = FileUtils.getTempDir(app); + File exportDir = app.getSettings().getExternalStorageDirectory(); String fileName = appMode.toHumanString(); SettingsHelper settingsHelper = app.getSettingsHelper(); settingsItems.addAll(settingsHelper.getFilteredSettingsItems(settingsHelper.getAdditionalData(), settingsTypes)); - settingsHelper.exportSettings(tempDir, fileName, null, settingsItems, true); + settingsHelper.exportSettings(exportDir, fileName, null, settingsItems, true); return true; } return false; @@ -2403,9 +2403,9 @@ public class OsmandAidlApi { } else if (fileName.endsWith(IndexConstants.GPX_FILE_EXT)) { if (destinationDir.startsWith(IndexConstants.GPX_INDEX_DIR) && !FILE_TO_SAVE.equals(fileName)) { - showGpx(new File(destinationDir, fileName).getName()); + destinationDir = destinationDir.replaceFirst(IndexConstants.GPX_INDEX_DIR, ""); + showGpx(new File(destinationDir, fileName).getPath()); } else if (destinationDir.isEmpty() && FILE_TO_SAVE.equals(fileName)) { - GPXUtilities.loadGPXFile(new File(destinationDir, fileName)); app.getFavorites().loadFavorites(); } }