public static ReadFilter getReadFilterForFolder(Context context, String folderName) { SharedPreferences prefs = context.getSharedPreferences(PrefConstants.PREFERENCES, 0); return ReadFilter.valueOf( prefs.getString( PrefConstants.FOLDER_READ_FILTER_PREFIX + folderName, getDefaultReadFilter(prefs).toString())); }
private static ReadFilter getDefaultReadFilter(SharedPreferences prefs) { return ReadFilter.valueOf( prefs.getString(PrefConstants.DEFAULT_READ_FILTER, ReadFilter.ALL.toString())); }