From ccc9978540308f5958e1735e7645d3ca8dd34128 Mon Sep 17 00:00:00 2001 From: Nico Alt Date: Mon, 13 Apr 2015 20:54:51 +0200 Subject: [PATCH] change some "defaultValue"s Key "theme": I also use the dark version of F-Droid but I think the most users would prefer the light version. This is also standard in the most used apps on Android, I think, see GApps, Flym, K-9, Telegram, ... Key "localRepoBonjour": I never used this function and I think it's better, if the user manually activates it when he wants to use it. Key "localRepoHttps": I see no reason why it should not use https over http, it's better of security view, I think. Key "cacheDownloaded": The most smartphones today have enough storage available to allow to enable this function. This would decrease the traffic on both sides, as the user does not have to download a app and the F-Droid server does not have to send it multiple times. --- F-Droid/res/xml/preferences.xml | 2 +- F-Droid/src/org/fdroid/fdroid/FDroidApp.java | 2 +- F-Droid/src/org/fdroid/fdroid/Preferences.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/F-Droid/res/xml/preferences.xml b/F-Droid/res/xml/preferences.xml index 517226a5c..9d94bcbc0 100644 --- a/F-Droid/res/xml/preferences.xml +++ b/F-Droid/res/xml/preferences.xml @@ -32,7 +32,7 @@ android:key="compactlayout"/> diff --git a/F-Droid/src/org/fdroid/fdroid/FDroidApp.java b/F-Droid/src/org/fdroid/fdroid/FDroidApp.java index 3c0431dcb..8676f3b44 100644 --- a/F-Droid/src/org/fdroid/fdroid/FDroidApp.java +++ b/F-Droid/src/org/fdroid/fdroid/FDroidApp.java @@ -185,7 +185,7 @@ public class FDroidApp extends Application { // because the install intent says it's finished when it hasn't. SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(getBaseContext()); - curTheme = Theme.valueOf(prefs.getString(Preferences.PREF_THEME, "dark")); + curTheme = Theme.valueOf(prefs.getString(Preferences.PREF_THEME, Preferences.DEFAULT_THEME)); if (!prefs.getBoolean(Preferences.PREF_CACHE_APK, false)) { Utils.deleteFiles(Utils.getApkCacheDir(this), null, ".apk"); } diff --git a/F-Droid/src/org/fdroid/fdroid/Preferences.java b/F-Droid/src/org/fdroid/fdroid/Preferences.java index ce166cc9a..21d125dbd 100644 --- a/F-Droid/src/org/fdroid/fdroid/Preferences.java +++ b/F-Droid/src/org/fdroid/fdroid/Preferences.java @@ -72,6 +72,7 @@ public class Preferences implements SharedPreferences.OnSharedPreferenceChangeLi private static final boolean DEFAULT_EXPERT = false; private static final boolean DEFAULT_PERMISSIONS = false; private static final boolean DEFAULT_ENABLE_PROXY = false; + public static final String DEFAULT_THEME = "light"; public static final String DEFAULT_PROXY_HOST = "127.0.0.1"; public static final int DEFAULT_PROXY_PORT = 8118; public static final boolean DEFAULT_SHOW_NFC_DURING_SWAP = true;