]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DictionaryApplication.java
Switch to themeSystem as default.
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryApplication.java
index fa4571c6483773b73ec6c2454c11295432b6e740..7ac45aeabfd2283ba590909a233c17dc044f86d3 100644 (file)
@@ -311,15 +311,15 @@ public enum DictionaryApplication {
 
     public Theme getSelectedTheme() {
         final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext);
-        final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeLight");
+        final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeSystem");
         if (theme.equals("themeLight")) {
             return Theme.LIGHT;
         } else if (theme.equals("themeSystem")) {
             int mode = (appContext.getResources().getConfiguration().uiMode &
                         Configuration.UI_MODE_NIGHT_MASK);
-            return ((mode == Configuration.UI_MODE_NIGHT_YES) ?
-                    Theme.DEFAULT :
-                    Theme.LIGHT);
+            return ((mode == Configuration.UI_MODE_NIGHT_NO) ?
+                    Theme.LIGHT:
+                    Theme.DEFAULT);
         } else {
             return Theme.DEFAULT;
         }