Skip to content

Commit

Permalink
Merge pull request #123 from thrillfall/bugfix/fix_crash_for_old_alarms
Browse files Browse the repository at this point in the history
fix exception on loading old alarms
  • Loading branch information
segler-alex authored Mar 13, 2017
2 parents 04d9e3f + baeb84e commit c36ba45
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void load(){
DataRadioStationAlarm alarm = new DataRadioStationAlarm();

alarm.station = DataRadioStation.DecodeJsonSingle(sharedPref.getString("alarm." + id + ".station", null));
String weekDaysString = sharedPref.getString("alarm." + id + ".weekDays", "");
String weekDaysString = sharedPref.getString("alarm." + id + ".weekDays", "[]");
Gson gson = new Gson();
alarm.weekDays = gson.fromJson(weekDaysString, new TypeToken<List<Integer>>(){}.getType());
alarm.hour = sharedPref.getInt("alarm." + id + ".timeHour", 0);
Expand Down

0 comments on commit c36ba45

Please sign in to comment.