fixed use of preferences

This commit is contained in:
Tom Hennen 2015-10-02 10:25:01 -04:00
parent fda662f697
commit af5579a30e
3 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ public class DBCleanupTests extends InstrumentationTestCase {
SharedPreferences.Editor prefEdit = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()).edit();
prefEdit.putString(UserPreferences.PREF_EPISODE_CACHE_SIZE, Integer.toString(EPISODE_CACHE_SIZE));
prefEdit.putInt(UserPreferences.PREF_EPISODE_CLEANUP, cleanupAlgorithm);
prefEdit.putString(UserPreferences.PREF_EPISODE_CLEANUP, Integer.toString(cleanupAlgorithm));
prefEdit.commit();
UserPreferences.init(context);

View File

@ -67,7 +67,7 @@ public class DBNullCleanupAlgorithmTest extends InstrumentationTestCase {
SharedPreferences.Editor prefEdit = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()).edit();
prefEdit.putString(UserPreferences.PREF_EPISODE_CACHE_SIZE, Integer.toString(EPISODE_CACHE_SIZE));
prefEdit.putInt(UserPreferences.PREF_EPISODE_CLEANUP, UserPreferences.EPISODE_CLEANUP_NULL);
prefEdit.putString(UserPreferences.PREF_EPISODE_CLEANUP, Integer.toString(UserPreferences.EPISODE_CLEANUP_NULL));
prefEdit.commit();
UserPreferences.init(context);

View File

@ -496,7 +496,7 @@ public class UserPreferences {
public static EpisodeCleanupAlgorithm getEpisodeCleanupAlgorithm() {
int cleanupValue = prefs.getInt(PREF_EPISODE_CLEANUP, -1);
int cleanupValue = Integer.valueOf(prefs.getString(PREF_EPISODE_CLEANUP, "-1"));
if (cleanupValue == EPISODE_CLEANUP_QUEUE) {
return new APQueueCleanupAlgorithm();
} else if (cleanupValue == EPISODE_CLEANUP_NULL) {