From 790d863496e030528e7e4f6b55339fb01684ebb0 Mon Sep 17 00:00:00 2001 From: Alexander Marchuk Date: Mon, 4 Jan 2016 17:11:55 +0300 Subject: [PATCH] [android] fix: Code readability improvements. --- android/src/com/mapswithme/util/Config.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/android/src/com/mapswithme/util/Config.java b/android/src/com/mapswithme/util/Config.java index 8df99f21f4..532fc13218 100644 --- a/android/src/com/mapswithme/util/Config.java +++ b/android/src/com/mapswithme/util/Config.java @@ -266,10 +266,10 @@ public final class Config public static String getCurrentUiTheme() { String res = getString(KEY_MISC_UI_THEME, ThemeUtils.THEME_DEFAULT); - if (!ThemeUtils.isValidTheme(res)) - res = ThemeUtils.THEME_DEFAULT; + if (ThemeUtils.isValidTheme(res)) + return res; - return res; + return ThemeUtils.THEME_DEFAULT; } public static void setCurrentUiTheme(String theme) @@ -284,10 +284,10 @@ public final class Config public static String getUiThemeSettings() { String res = getString(KEY_MISC_UI_THEME_SETTINGS, ThemeUtils.THEME_DEFAULT); - if (!ThemeUtils.isValidTheme(res) && !ThemeUtils.isAutoTheme(res)) - res = ThemeUtils.THEME_DEFAULT; + if (ThemeUtils.isValidTheme(res) || ThemeUtils.isAutoTheme(res)) + return res; - return res; + return ThemeUtils.THEME_DEFAULT; } public static boolean setUiThemeSettings(String theme)