Experimental feature setting

This commit is contained in:
Dominik Schürmann
2015-08-27 12:24:37 +02:00
parent f92e5f663f
commit ec7a3a7047
6 changed files with 60 additions and 9 deletions

View File

@@ -335,7 +335,7 @@ public class Preferences {
}
}
// proxy preference functions ends here
// cloud prefs
public CloudSearchPrefs getCloudSearchPrefs() {
return new CloudSearchPrefs(mSharedPreferences.getBoolean(Pref.SEARCH_KEYSERVER, true),
@@ -360,6 +360,18 @@ public class Preferences {
}
}
// other prefs
public void setEnableExperimentalFeatures(boolean enableExperimentalFeatures) {
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.putBoolean(Pref.ENABLE_EXPERIMENTAL_FEATURES, enableExperimentalFeatures);
editor.commit();
}
public boolean getEnableExperimentalFeatures() {
return mSharedPreferences.getBoolean(Pref.ENABLE_EXPERIMENTAL_FEATURES, false);
}
public void upgradePreferences(Context context) {
if (mSharedPreferences.getInt(Constants.Pref.PREF_DEFAULT_VERSION, 0) !=
Constants.Defaults.PREF_VERSION) {