diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index 95d7748a88..bd46c48673 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -3909,7 +3909,16 @@ public class OsmandSettings { new IntPreference("FAVORITES_TAB", 0).makeGlobal().cache(); public final CommonPreference OSMAND_THEME = - new IntPreference("osmand_theme", OSMAND_LIGHT_THEME).makeProfile().cache(); + new IntPreference("osmand_theme", OSMAND_LIGHT_THEME) { + @Override + public void readFromJson(JSONObject json, ApplicationMode appMode) throws JSONException { + Integer theme = parseString(json.getString(getId())); + if (theme == SYSTEM_DEFAULT_THEME && !isSupportSystemDefaultTheme()) { + theme = OSMAND_LIGHT_THEME; + } + setModeValue(appMode, theme); + } + }.makeProfile().cache(); public final OsmandPreference OPEN_ONLY_HEADER_STATE_ROUTE_CALCULATED = new BooleanPreference("open_only_header_route_calculated", false).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/GeneralProfileSettingsFragment.java index cbd682cf9d..e870fed149 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/GeneralProfileSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/GeneralProfileSettingsFragment.java @@ -119,7 +119,8 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme private Drawable getOsmandThemeIcon() { int iconId; - if (settings.isSystemDefaultThemeUsed()) { + ApplicationMode mode = getSelectedAppMode(); + if (settings.isSystemDefaultThemeUsedForMode(mode)) { iconId = R.drawable.ic_action_android; } else { iconId = settings.isLightContent() ? R.drawable.ic_action_sun : R.drawable.ic_action_moon;