Пример #1
0
 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()));
 }
Пример #2
0
 private static ReadFilter getDefaultReadFilter(SharedPreferences prefs) {
   return ReadFilter.valueOf(
       prefs.getString(PrefConstants.DEFAULT_READ_FILTER, ReadFilter.ALL.toString()));
 }