sysresmonitoring/oodmonitor/src/lafshut.cpp
branchRCL_3
changeset 62 924385140d98
parent 0 2e3d3ce01487
child 63 c2c61fdca848
child 77 b01c07dfcf84
--- a/sysresmonitoring/oodmonitor/src/lafshut.cpp	Thu Aug 19 10:05:08 2010 +0300
+++ b/sysresmonitoring/oodmonitor/src/lafshut.cpp	Tue Aug 31 15:24:25 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -24,10 +24,6 @@
 #include <bautils.h>
 #include <e32property.h>
 #include <UikonInternalPSKeys.h>
-#include <aknglobalnote.h>
-#include <secondarydisplay/aknsecondarydisplaydefs.h>
-#include <aknsddata.h>
-#include <avkon.rsg>
 #include <data_caging_path_literals.hrh>
 #include <coreapplicationuisdomainpskeys.h>
 
@@ -726,7 +722,6 @@
 CLafShutdownManager::CGlobalQueryActive::~CGlobalQueryActive()
     {
     TRACES("CLafShutdownManager::CGlobalQueryActive::~CGlobalQueryActive");        
-    delete iQuery;
     delete iMessageInfo[ECritical];
     delete iMessageInfo[EWarning];
     delete iMessageInfo[EWarningMMC];
@@ -801,50 +796,21 @@
         return;
         }
 
-    if (!iQuery)
-        {
-        iQuery = CAknGlobalNote::NewL();
-        iQuery->SetSoftkeys(R_AVKON_SOFTKEYS_OK_EMPTY);        
-        }
-
-    if (aType != ECallBack)
+      if (aType != ECallBack)
         {
         iMessageType = aType;
         }
 
     CleanupL();
 
-    if (iMessageType != ENone && (iMessageInfo[iMessageType]->iNoteId == KErrNotFound || aForcedNote))
-        {
-        TInt dialogId = 0;
-        switch(iMessageType)
-            {
-        case EWarning:
-            dialogId = EAknDiskWarnignNote;
-            break;
-        case ECritical:
-            dialogId = EAknDiskFullNote;
-            break;
-        case ECriticalMMC:    
-            dialogId = EAknMMCFullNote;
-            break;
-        default:
-            dialogId = EAknMMCWarningNote;
-            break;            
-            }
+          
+        CHbDeviceMessageBoxSymbian* globalNote = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
+        CleanupStack::PushL(globalNote);
+        globalNote->SetTextL((iMessageInfo[iMessageType]->iMessage)->Des());
+        globalNote->SetTimeoutL(0);
+        globalNote->ExecL();
+        CleanupStack::PopAndDestroy(globalNote);
         
-        CAknSDData* sd = CAknSDData::NewL(KAknSecondaryDisplayCategory, dialogId, KNullDesC8);
-        iQuery->SetSecondaryDisplayData(sd);
-        
-        TInt noteid = iQuery->ShowNoteL(EAknGlobalWarningNote,
-                                        (iMessageInfo[iMessageType]->iMessage)->Des());
-                                        
-        if (noteid != KErrNotFound) // Note was added to queue successfully.
-            {
-            iMessageInfo[iMessageType]->iNoteId = noteid;
-            }
-        }
-
     iMessageType = ENone;
     TRACES("CLafShutdownManager::CGlobalQueryActive::DisplayL: End");
     }
@@ -877,11 +843,7 @@
             break;
             }
 
-        if (cancelNoteId != KErrNotFound && aCancel)
-            {
-            iQuery->CancelNoteL(cancelNoteId);
-            }
-        }
+         }
     TRACES("CLafShutdownManager::CGlobalQueryActive::CleanupL: End");
     }