diff options
Diffstat (limited to 'cgeo-calendar')
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/AddEntry.java | 2 | ||||
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java | 2 | ||||
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/CalendarEntry.java | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/cgeo-calendar/src/cgeo/calendar/AddEntry.java b/cgeo-calendar/src/cgeo/calendar/AddEntry.java index 39092cb..b1f97b9 100644 --- a/cgeo-calendar/src/cgeo/calendar/AddEntry.java +++ b/cgeo-calendar/src/cgeo/calendar/AddEntry.java @@ -32,7 +32,7 @@ class AddEntry extends AbstractAddEntry { final ContentValues event = new ContentValues(); event.put("calendar_id", calendarId); if (entry.getStartTimeMinutes() >= 0) { - event.put("dtstart", eventDate.getTime() + entry.getStartTimeMinutes() * 60000); + event.put("dtstart", eventDate.getTime() + entry.getStartTimeMinutes() * 60000L); } else { event.put("dtstart", eventDate.getTime() + 43200000); // noon diff --git a/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java b/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java index 787be73..44453dd 100644 --- a/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java +++ b/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java @@ -35,7 +35,7 @@ class AddEntryLevel14 extends AbstractAddEntry { .putExtra("eventTimezone", "UTC") .putExtra("eventLocation", eventLocation); if (entry.getStartTimeMinutes() >= 0) { - intent.putExtra("beginTime", eventDate.getTime() + entry.getStartTimeMinutes() * 60000); + intent.putExtra("beginTime", eventDate.getTime() + entry.getStartTimeMinutes() * 60000L); } else { intent.putExtra("beginTime", eventDate.getTime() + 43200000); diff --git a/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java b/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java index 3e4de73..e31e054 100644 --- a/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java +++ b/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java @@ -2,6 +2,8 @@ package cgeo.calendar; import cgeo.geocaching.utils.Log; +import org.apache.commons.lang3.CharEncoding; + import android.net.Uri; import android.text.Html; import android.text.Spanned; @@ -48,7 +50,7 @@ class CalendarEntry { if (param == null) { return ""; } - return URLDecoder.decode(param, "UTF-8").trim(); + return URLDecoder.decode(param, CharEncoding.UTF_8).trim(); } catch (UnsupportedEncodingException e) { Log.e("CalendarEntry.getParameter", e); } @@ -56,7 +58,7 @@ class CalendarEntry { } public boolean isValid() { - return (getName().length() > 0 && getHiddenDate().length() > 0); + return getName().length() > 0 && getHiddenDate().length() > 0; } public String getHiddenDate() { |