From 4b6fa3bbefacf8b6e6d3af2dee7271f2fe87508d Mon Sep 17 00:00:00 2001 From: nnngrach Date: Tue, 2 Feb 2021 04:03:51 +0300 Subject: [PATCH] Revert "add default profile name for unnamed or missing improted profiles" This reverts commit 56e8f85c04510ea75fb8ab242860b18a9533d639. --- .../settings/backend/backup/ProfileSettingsItem.java | 3 +-- .../settings/fragments/DuplicatesSettingsAdapter.java | 7 +------ .../plus/settings/fragments/ExportItemsBottomSheet.java | 9 +-------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/backup/ProfileSettingsItem.java b/OsmAnd/src/net/osmand/plus/settings/backend/backup/ProfileSettingsItem.java index 5590d306c6..b0bfd5be61 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/backup/ProfileSettingsItem.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/backup/ProfileSettingsItem.java @@ -26,7 +26,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.StringUtils; public class ProfileSettingsItem extends OsmandSettingsItem { @@ -125,7 +124,7 @@ public class ProfileSettingsItem extends OsmandSettingsItem { if (Algorithms.isEmpty(modeBean.userProfileName)) { ApplicationMode appMode = ApplicationMode.valueOfStringKey(modeBean.stringKey, null); if (appMode != null) { - modeBean.userProfileName = appMode.toHumanString(); + modeBean.userProfileName = app.getString(appMode.getNameKeyResource()); } } int number = 0; diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java index 7e7e52f340..5d9e3af28a 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/DuplicatesSettingsAdapter.java @@ -33,7 +33,6 @@ import net.osmand.plus.settings.backend.ApplicationMode; import net.osmand.plus.settings.backend.ApplicationMode.ApplicationModeBean; import net.osmand.util.Algorithms; -import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import java.io.File; @@ -92,11 +91,7 @@ public class DuplicatesSettingsAdapter extends RecyclerView.Adapter