alarmui/src/AlmAlarmControl.cpp
changeset 23 fd30d51f876b
parent 18 c198609911f9
child 45 b6db4fd4947b
--- a/alarmui/src/AlmAlarmControl.cpp	Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/src/AlmAlarmControl.cpp	Mon May 03 12:30:32 2010 +0300
@@ -133,7 +133,7 @@
         && iState != EStateWaitingInput )
     {
         // stop the context/sensor observer.
-        // PIM_TRAPD_ASSERT( iAlarmUtils->StopCFObserverL(); )
+        PIM_TRAPD_ASSERT( iAlarmUtils->StopCFObserverL(); )
 
         // stop waiting for "end call" command from accessories
         iAlarmUtils->StopAccessoryObserver();
@@ -192,7 +192,7 @@
             iAlarmUtils->StartAccessoryObserver();
 
             // publish new alarm context value and wait for any actions
-            // PIM_TRAPD_ASSERT( iAlarmUtils->StartCFObserverL(); )
+            PIM_TRAPD_ASSERT( iAlarmUtils->StartCFObserverL(); )
             break;
         }
 
@@ -258,7 +258,12 @@
 void CAlmAlarmControl::DoCancelDialog()
 {
     TRACE_ENTRY_POINT;
-
+    /*if( iGlobalNoteId != KErrNotFound )
+    {
+        // iAlarmUtils->NotifierDialogController()->SetNoteObserver( this );
+        // iAlarmUtils->NotifierDialogController()->CancelNote( iGlobalNoteId );
+        iAlarmUtils->NotifierDialogController()->dismissAlarmAlert();
+    }*/
     iAlarmUtils->NotifierDialogController()->dismissAlarmAlert();
     iAlarmUtils->StopAlarmSound();
     iAlarmUtils->CancelAutoSnooze();
@@ -1322,8 +1327,7 @@
  
  void CAlmAlarmControl::alertCompleted(AlarmCommand command)
  {
-     // cancel timers
-     iAlarmUtils->CancelAutoSnooze();
+     //iAlarmUtils->CancelShutdown();
      iAlarmUtils->StopAlarmSound();
 
      switch( iState )
@@ -1342,13 +1346,17 @@
                  case AlarmStop:
                      {
                      SetState( EStateAfterInput );
+					 // cancel timers
+					 iAlarmUtils->CancelAutoSnooze();
                      iAskWakeup = ETrue; // ask wakeup after all the alarms are handled
                      iAlarmUtils->DoStopAlarm();  // stop
                      break;
                      }
                  case AlarmSnooze:
                      {
-                     SetState( EStateAfterInput );
+                     // cancel timers
+					 iAlarmUtils->CancelAutoSnooze();
+					 SetState( EStateAfterInput );
 
                      SetState( EStateShowingSnoozeInfo );
                      iAlarmUtils->TryToSnoozeActiveAlarm();