diff options
author | Danny Baumann <dannybaumann@web.de> | 2014-04-17 08:33:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2014-04-17 08:33:31 +0000 |
commit | 1c609704c8697d8e16d8a158eb0af1bf1eb7b532 (patch) | |
tree | bf6ccaf23876048c5174454173e51ecf42ca401d /src | |
parent | 91a6ed464fcac5cc9ff6229256f649c3367118fe (diff) | |
parent | 9c765fe720a398c2eb6d39b254cb5e6170c21077 (diff) | |
download | android_packages_apps_LockClock-1c609704c8697d8e16d8a158eb0af1bf1eb7b532.tar.gz android_packages_apps_LockClock-1c609704c8697d8e16d8a158eb0af1bf1eb7b532.tar.bz2 android_packages_apps_LockClock-1c609704c8697d8e16d8a158eb0af1bf1eb7b532.zip |
Merge "LockClock: display date range for multi-day allday appointments" into cm-11.0
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/cyanogenmod/lockclock/calendar/CalendarViewsService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/lockclock/calendar/CalendarViewsService.java b/src/com/cyanogenmod/lockclock/calendar/CalendarViewsService.java index 893d8f7..6e207e4 100755 --- a/src/com/cyanogenmod/lockclock/calendar/CalendarViewsService.java +++ b/src/com/cyanogenmod/lockclock/calendar/CalendarViewsService.java @@ -290,6 +290,7 @@ class CalendarRemoteViewsFactory implements RemoteViewsFactory { final String description = cursor.getString(indexDescription); final String location = cursor.getString(indexLocation); final boolean allDay = cursor.getInt(indexAllDay) != 0; + final boolean multiDay = allDay && (end - begin) > DAY_IN_MILLIS; int format = 0; if (allDay) { @@ -314,7 +315,7 @@ class CalendarRemoteViewsFactory implements RemoteViewsFactory { } else { format = Constants.CALENDAR_FORMAT_FUTURE; } - if (allDay || begin == end) { + if ((allDay && !multiDay) || begin == end) { sb.append(DateUtils.formatDateTime(context, begin, format)); } else { sb.append(DateUtils.formatDateRange(context, begin, end, format)); |