diff -r 15bf7259bb7c -r 8f67d927ea57 uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp --- a/uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp Tue Feb 02 07:56:43 2010 +0200 +++ b/uiacceltk/hitchcock/goommonitor/src/goomcloseapp.cpp Fri Mar 19 09:43:21 2010 +0200 @@ -24,8 +24,6 @@ #include "goomappclosewatcher.h" #include "goomactionref.h" -const TInt KGOomMaxAppExitTime = 1000000; -const TInt KGOomMaxAppAfterKillWaitTime = 1000000; CGOomCloseApp* CGOomCloseApp::NewL(MGOomActionObserver& aStateChangeObserver, RWsSession& aWs) { @@ -51,10 +49,10 @@ // Start a timer and the thread watcher iAppCloseTimer->SetState(CGOomAppCloseTimer::EGOomAppClosing); - iAppCloseTimer->After(KGOomMaxAppExitTime); + iAppCloseTimer->After(iCloseTimeout * 1000); iAppCloseWatcher->Start(iCurrentTask); // Tell the app to close - TRACES1("CGOomCloseApp::FreeMemory: Closing app with window group id %d",iWgId); + TRACES2("CGOomCloseApp::FreeMemory: Closing app with window group id %d Timeout = %d",iWgId, iCloseTimeout); iCurrentTask.EndTask(); } @@ -81,12 +79,16 @@ iAppCloserRunning = EFalse; if (iAppCloseTimer) - iAppCloseTimer->Cancel(); + { + iAppCloseTimer->Cancel(); + iAppCloseTimer->SetState(CGOomAppCloseTimer::EGOomAppKilled); + iAppCloseTimer->After(iWaitAfterClose * 1000); + } + if (iAppCloseWatcher) iAppCloseWatcher->Cancel(); - iAppCloseTimer->SetState(CGOomAppCloseTimer::EGOomAppKilled); - iAppCloseTimer->After(KGOomMaxAppAfterKillWaitTime); + //MemoryFreed(KErrNone); } @@ -95,6 +97,8 @@ FUNC_LOG; iWgId = aRef.WgId(); + iCloseTimeout = aRef.CloseTimeout(); + iWaitAfterClose = aRef.WaitAfterClose(); } void CGOomCloseApp::ConstructL() @@ -128,7 +132,7 @@ iAppCloserRunning = EFalse; iAppCloseTimer->SetState(CGOomAppCloseTimer::EGOomAppKilled); - iAppCloseTimer->After(KGOomMaxAppAfterKillWaitTime); + iAppCloseTimer->After(iWaitAfterClose * 1000); //MemoryFreed(KErrNone); }