Fix for Issue N_SE-44351
authorGaurav Bhatt <gaurav.bhatt@samsung.com>
Tue, 2 Jul 2013 08:24:51 +0000 (13:54 +0530)
committerChangyong Jeon <fin10.jeon@samsung.com>
Tue, 2 Jul 2013 10:19:05 +0000 (19:19 +0900)
Changed as per the review comments.
Change-Id: I30b77e7bec8f6355e18b1aa2ee10c3ee725ef813
Signed-off-by: Gaurav Bhatt <gaurav.bhatt@samsung.com>
src/ClRepeatForm.cpp

index dc872c7..54c6f42 100644 (file)
@@ -214,12 +214,7 @@ RepeatForm::OnFormBackRequested(Form& source)
        }
        else
        {
-               // Todo: Recurrence::SetUntil()'s behavior is not matched with its doxygen.
-               //       In API description, SetUntil() is available to set DateTime::GetMaxValue(), but it returns E_INVALID_ARG.
-               //       However, according to E_INVALID_ARG description, if date > GetMaxDateTime() then API returns E_INVALID_ARG.
-               //       If above contradiction is resolved in the future SDK, below code will be modified, depending on the policy of the SDK.
-               DateTime maxDate = Calendarbook::GetMaxDateTime();
-               maxDate.AddYears(-1);
+               DateTime maxDate = DateTime::GetMaxValue();
                __pRepeat->SetUntil(&maxDate);
        }
 
@@ -601,8 +596,8 @@ RepeatForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cur
        {
                delete __pRepeat;
                __pRepeat = new (std::nothrow) Recurrence(*pRecurrence);
-               DateTime maxdate = Calendarbook::GetMaxDateTime();
-               maxdate.SetValue(maxdate.GetYear(),1,1);
+               DateTime maxdate = DateTime::GetMaxValue();
+
 
                int prevRepeatIndex = (int)__repeatType;
                int prevRepeatUntilIndex = (int)__repeatUntilType;
@@ -791,12 +786,7 @@ RepeatForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        }
                        else
                        {
-                               // Todo: Recurrence::SetUntil()'s behavior is not matched with its doxygen.
-                               //       In API description, SetUntil() is available to set DateTime::GetMaxValue(), but it returns E_INVALID_ARG.
-                               //       However, according to E_INVALID_ARG description, if date > GetMaxDateTime() then API returns E_INVALID_ARG.
-                               //       If above contradiction is resolved in the future SDK, below code will be modified, depending on the policy of the SDK.
-                               DateTime maxDate = Calendarbook::GetMaxDateTime();
-                               maxDate.AddYears(-1);
+                               DateTime maxDate = DateTime::GetMaxValue();
                                __pRepeat->SetUntil(&maxDate);
                        }