Example #1
0
 public static void setRepeatMode(Context context, RepeatMode repeatMode) {
   SharedPreferences prefs = getPreferences(context);
   SharedPreferences.Editor editor = prefs.edit();
   editor.putString(Constants.PREFERENCES_KEY_REPEAT_MODE, repeatMode.name());
   editor.commit();
 }
Example #2
0
 public static RepeatMode getRepeatMode(Context context) {
   SharedPreferences prefs = getPreferences(context);
   return RepeatMode.valueOf(
       prefs.getString(Constants.PREFERENCES_KEY_REPEAT_MODE, RepeatMode.OFF.name()));
 }