From 6dcde54ace36f6668fd8e43f8f4b2b2267932355 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 3 Feb 2021 11:41:56 +0200 Subject: [PATCH] Fix check for default profile --- .../net/osmand/plus/settings/backend/ApplicationMode.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java index 59d8172bb1..efb02fefc0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/ApplicationMode.java @@ -301,7 +301,12 @@ public class ApplicationMode { } public boolean isCustomProfile() { - return !defaultValues.contains(this); + for (ApplicationMode mode : defaultValues) { + if (Algorithms.stringsEqual(mode.getStringKey(), getStringKey())) { + return false; + } + } + return true; } public boolean isDerivedRoutingFrom(ApplicationMode mode) {