javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp
branchRCL_3
changeset 18 9ac0a0a7da70
parent 17 0fd27995241b
child 23 e5618cc85d74
--- a/javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp	Tue May 11 16:07:20 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/src/CMIDToolkit.cpp	Tue May 25 12:34:19 2010 +0300
@@ -30,7 +30,7 @@
 #include <e32property.h>
 #include <centralrepository.h>
 #include <settingsinternalcrkeys.h>
-#include <screensaverinternalpskeys.h>      // to work with screensaver
+#include <ScreensaverInternalPSKeys.h>      // to work with screensaver
 #include <gfxtranseffect/gfxtranseffect.h>  // For transition effects
 #include <akntranseffect.h>                                 // For transition effects
 //
@@ -566,34 +566,35 @@
 
         if (mFirst)
         {
-            java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
-            if (appUi && appUi->hasStartScreen())
-            {
-                MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL;
+            mFirst = EFalse;
+        }
+    }
+    
+    // Stop the start screen if it is still active.
+    java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
+    if (appUi && appUi->hasStartScreen())
+    {
+        MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL;
 
-                TBool isCanvas = EFalse;
-                TBool isCanvasReadyToBlit = EFalse;
-                if (content)
-                {
-                    if (content->Type() == MMIDComponent::ECanvas)
-                    {
-                        isCanvas = ETrue;
-                        MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content);
-                        isCanvasReadyToBlit = canvas->ReadyToBlit();
-                    }
-                }
+        TBool isCanvas = EFalse;
+        TBool isCanvasReadyToBlit = EFalse;
+        if (content)
+        {
+            if (content->Type() == MMIDComponent::ECanvas)
+            {
+                isCanvas = ETrue;
+                MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content);
+                isCanvasReadyToBlit = canvas->ReadyToBlit();
+            }
+        }
 
-                if (!content || !isCanvas || isCanvasReadyToBlit)
-                {
-                    if (iCurrentDisplayable)
-                    {
-                        iCurrentDisplayable->DrawNow();
-                    }
-                    appUi->stopStartScreen();
-                }
+        if (!content || !isCanvas || isCanvasReadyToBlit)
+        {
+            if (iCurrentDisplayable)
+            {
+                iCurrentDisplayable->DrawNow();
             }
-
-            mFirst = EFalse;
+            appUi->stopStartScreen();
         }
     }
 }
@@ -605,7 +606,7 @@
     if (mFirst)
     {
         java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
-        appUi->stopStartScreen();
+        appUi->stopStartScreen(false); // no screenshot
         mFirst = EFalse;
     }
     iMidletRequestedBg = ETrue;