taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp
branchRCL_3
changeset 16 9674c1a575e9
parent 15 ff572dfe6d86
child 30 b8fae6b8a148
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp	Fri Mar 12 15:41:49 2010 +0200
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp	Mon Mar 15 12:39:47 2010 +0200
@@ -57,7 +57,6 @@
 //values for checking the OOM
 const TInt KMemoryRequestAmountInBytes = 524288;
 const TInt KMinMemoryAmountInBytes = 524288;
-const TInt KMemoryToBeReservedInBytes = 524288; // 512 KB
 
 // time to wait before sending the task to background
 // (must give time to animation)
@@ -190,7 +189,6 @@
         }
 
     delete iDeviceState;
-    delete iMemAllocBuf;
     delete iThemeEffectsEnabledWatcher;
     
     iWg.Close();
@@ -265,10 +263,13 @@
 // CTsAppUi::TransitionFinished
 // -----------------------------------------------------------------------------
 //
-void CTsAppUi::TransitionFinished(const CCoeControl* /*aControl*/, 
+void CTsAppUi::TransitionFinished(const CCoeControl* aControl, 
                                   TUint /*aAction*/)
     {
-    TRAP_IGNORE( DisablePopUpL() );
+    if ( aControl == iAppView )
+        {
+        TRAP_IGNORE( DisablePopUpL() );
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -526,13 +527,6 @@
         iForeground = EFalse;
         SetTaskswitcherStateProperty( KTaskswitcherBackgroundValue );
 
-        //allocating extra memory space
-        if ( !iMemAllocBuf )
-            {
-            iMemAllocBuf =
-                (TUint8*) User::Alloc( KMemoryToBeReservedInBytes );
-            }
-
         // notify view
         iAppView->HandleSwitchToBackgroundEvent();
         }
@@ -552,10 +546,6 @@
     // must not do anything if iForeground is already up-to-date
     if ( !iForeground )
         {
-        //freeing extra memory space
-        delete iMemAllocBuf;
-        iMemAllocBuf = NULL;
-
         TInt freeRamMemory;
         HAL::Get( HALData::EMemoryRAMFree, freeRamMemory );
         if ( freeRamMemory <= KMinMemoryAmountInBytes )