summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/calendar/event/EditEventView.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/calendar/event/EditEventView.java b/src/com/android/calendar/event/EditEventView.java
index a06774b8..ab61c3d2 100644
--- a/src/com/android/calendar/event/EditEventView.java
+++ b/src/com/android/calendar/event/EditEventView.java
@@ -570,7 +570,7 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa
if (mModel == null || (mCalendarsCursor == null && mModel.mUri == null)) {
return false;
}
- return fillModelFromUI();
+ return fillModelFromUI(true);
}
public boolean fillModelFromReadOnlyUi() {
@@ -667,7 +667,7 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa
}
// Goes through the UI elements and updates the model as necessary
- private boolean fillModelFromUI() {
+ private boolean fillModelFromUI(boolean ignoreAllday) {
if (mModel == null) {
return false;
}
@@ -716,7 +716,7 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa
}
}
- if (mModel.mAllDay) {
+ if (mModel.mAllDay && !ignoreAllday) {
// Reset start and end time, increment the monthDay by 1, and set
// the timezone to UTC, as required for all-day events.
mTimezone = Time.TIMEZONE_UTC;
@@ -730,6 +730,7 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa
mEndTime.minute = 0;
mEndTime.second = 0;
mEndTime.timezone = mTimezone;
+ mModel.mEnd = mEndTime.normalize(true);
// When a user see the event duration as "X - Y" (e.g. Oct. 28 - Oct. 29), end time
// should be Y + 1 (Oct.30).
final long normalizedEndTimeMillis =
@@ -1366,7 +1367,7 @@ public class EditEventView implements View.OnClickListener, DialogInterface.OnCa
if (mSaveAfterQueryComplete) {
mLoadingCalendarsDialog.cancel();
- if (prepareForSave() && fillModelFromUI()) {
+ if (prepareForSave() && fillModelFromUI(false)) {
int exit = userVisible ? Utils.DONE_EXIT : 0;
mDone.setDoneCode(Utils.DONE_SAVE | exit);
mDone.run();