Prevent crash

pull/212/head
M66B 2 years ago
parent bd6ba84241
commit 423f6871bb

@ -56,7 +56,7 @@ public class CalendarHelper {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String weekend = prefs.getString("weekend", Calendar.SATURDAY + "," + Calendar.SUNDAY);
for (String day : weekend.split(","))
if (aday == Integer.parseInt(day))
if (!TextUtils.isEmpty(day) && aday == Integer.parseInt(day))
return true;
return false;
}

Loading…
Cancel
Save