Revert "add default profile name for unnamed or missing improted profiles"
This reverts commit 56e8f85c04
.
This commit is contained in:
parent
c2a88ef523
commit
4b6fa3bbef
3 changed files with 3 additions and 16 deletions
|
@ -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;
|
||||
|
|
|
@ -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<RecyclerView
|
|||
String profileName = modeBean.userProfileName;
|
||||
if (Algorithms.isEmpty(profileName)) {
|
||||
ApplicationMode appMode = ApplicationMode.valueOfStringKey(modeBean.stringKey, null);
|
||||
try {
|
||||
profileName = app.getString(appMode.getNameKeyResource());
|
||||
} catch (Exception e) {
|
||||
profileName = StringUtils.capitalize(modeBean.stringKey);
|
||||
}
|
||||
profileName = app.getString(appMode.getNameKeyResource());
|
||||
}
|
||||
itemHolder.title.setText(profileName);
|
||||
String routingProfile = "";
|
||||
|
|
|
@ -61,7 +61,6 @@ import net.osmand.plus.settings.fragments.ExportSettingsAdapter.OnItemSelectedLi
|
|||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.view.ThreeStateCheckbox;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -280,13 +279,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
|
|||
String profileName = modeBean.userProfileName;
|
||||
if (Algorithms.isEmpty(profileName)) {
|
||||
ApplicationMode appMode = ApplicationMode.valueOfStringKey(modeBean.stringKey, null);
|
||||
if (appMode != null) {
|
||||
profileName = appMode.toHumanString();
|
||||
} else {
|
||||
String defaultProfileName = StringUtils.capitalize(modeBean.stringKey);
|
||||
profileName = defaultProfileName;
|
||||
modeBean.userProfileName = defaultProfileName;
|
||||
}
|
||||
profileName = appMode.toHumanString();
|
||||
}
|
||||
builder.setTitle(profileName);
|
||||
|
||||
|
|
Loading…
Reference in a new issue