diff -r dcd0ca396fa1 -r 5aadd1120515 calendarui/views/src/calennativeview.cpp --- a/calendarui/views/src/calennativeview.cpp Tue Oct 05 14:14:48 2010 +0530 +++ b/calendarui/views/src/calennativeview.cpp Fri Oct 15 12:10:36 2010 +0530 @@ -53,8 +53,9 @@ CalenNativeView::CalenNativeView(MCalenServices &services) : mServices(services), mEntriesInDataBase(false), - mIsCapturedScreenShotValid(false), - mDatePicker(0) + mDatePicker(0), + mIsCapturedScreenShotValid(false), + mForcedExit(false) { OstTraceFunctionEntry0( CALENNATIVEVIEW_CALENNATIVEVIEW_ENTRY ); @@ -69,7 +70,7 @@ notificationArray.Append(ECalenNotifySystemLocaleChanged); notificationArray.Append(ECalenNotifyContextChanged); notificationArray.Append(ECalenNotifyCloseDialogs); - + notificationArray.Append(ECalenNotifyForcedExit); mServices.RegisterForNotificationsL(this, notificationArray); CleanupStack::PopAndDestroy(¬ificationArray); @@ -96,7 +97,17 @@ // Population is complete, issue the notification mServices.IssueNotificationL(ECalenNotifyViewPopulationComplete); - + //if entry is created in editor, and app closed from either + // task switcher or red key + //latest entry should be shown in activity + //provide uinfo to user that entry get saved + if(mForcedExit){ + captureScreenshot(true); + saveActivity(); + } + else{ + captureScreenshot(false); + } OstTraceFunctionExit0( CALENNATIVEVIEW_POPULATIONCOMPLETE_EXIT ); } @@ -264,6 +275,10 @@ emit closeDialogs(); } break; + case ECalenNotifyForcedExit:{ + mForcedExit = true; + } + break; default: break; }