From baeb84e0cace47fcda44172e9e5be4db853d2e2d Mon Sep 17 00:00:00 2001 From: thrillfall Date: Mon, 13 Mar 2017 19:51:32 +0100 Subject: [PATCH] fix exception on loading old alarms --- .../java/net/programmierecke/radiodroid2/RadioAlarmManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/programmierecke/radiodroid2/RadioAlarmManager.java b/app/src/main/java/net/programmierecke/radiodroid2/RadioAlarmManager.java index 0b0df0187..52e3467b1 100644 --- a/app/src/main/java/net/programmierecke/radiodroid2/RadioAlarmManager.java +++ b/app/src/main/java/net/programmierecke/radiodroid2/RadioAlarmManager.java @@ -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>(){}.getType()); alarm.hour = sharedPref.getInt("alarm." + id + ".timeHour", 0);