28 #include <s32stor.h> |
28 #include <s32stor.h> |
29 #include <s32file.h> |
29 #include <s32file.h> |
30 #include <e32property.h> |
30 #include <e32property.h> |
31 #include <centralrepository.h> |
31 #include <centralrepository.h> |
32 #include <settingsinternalcrkeys.h> |
32 #include <settingsinternalcrkeys.h> |
33 #include <screensaverinternalpskeys.h> // to work with screensaver |
33 #include <ScreensaverInternalPSKeys.h> // to work with screensaver |
34 #include <gfxtranseffect/gfxtranseffect.h> // For transition effects |
34 #include <gfxtranseffect/gfxtranseffect.h> // For transition effects |
35 #include <akntranseffect.h> // For transition effects |
35 #include <akntranseffect.h> // For transition effects |
36 // |
36 // |
37 #include "lcdui.h" |
37 #include "lcdui.h" |
38 #include "lcdgr.h" |
38 #include "lcdgr.h" |
564 |
564 |
565 SetOrdinalPosition(KWgOrdinalForeground); |
565 SetOrdinalPosition(KWgOrdinalForeground); |
566 |
566 |
567 if (mFirst) |
567 if (mFirst) |
568 { |
568 { |
569 java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi(); |
569 mFirst = EFalse; |
570 if (appUi && appUi->hasStartScreen()) |
570 } |
|
571 } |
|
572 |
|
573 // Stop the start screen if it is still active. |
|
574 java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi(); |
|
575 if (appUi && appUi->hasStartScreen()) |
|
576 { |
|
577 MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL; |
|
578 |
|
579 TBool isCanvas = EFalse; |
|
580 TBool isCanvasReadyToBlit = EFalse; |
|
581 if (content) |
|
582 { |
|
583 if (content->Type() == MMIDComponent::ECanvas) |
571 { |
584 { |
572 MMIDComponent* content = iCurrentDisplayable ? iCurrentDisplayable->Component() : NULL; |
585 isCanvas = ETrue; |
573 |
586 MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content); |
574 TBool isCanvas = EFalse; |
587 isCanvasReadyToBlit = canvas->ReadyToBlit(); |
575 TBool isCanvasReadyToBlit = EFalse; |
|
576 if (content) |
|
577 { |
|
578 if (content->Type() == MMIDComponent::ECanvas) |
|
579 { |
|
580 isCanvas = ETrue; |
|
581 MMIDCanvas* canvas = static_cast<MMIDCanvas*>(content); |
|
582 isCanvasReadyToBlit = canvas->ReadyToBlit(); |
|
583 } |
|
584 } |
|
585 |
|
586 if (!content || !isCanvas || isCanvasReadyToBlit) |
|
587 { |
|
588 if (iCurrentDisplayable) |
|
589 { |
|
590 iCurrentDisplayable->DrawNow(); |
|
591 } |
|
592 appUi->stopStartScreen(); |
|
593 } |
|
594 } |
588 } |
595 |
589 } |
596 mFirst = EFalse; |
590 |
|
591 if (!content || !isCanvas || isCanvasReadyToBlit) |
|
592 { |
|
593 if (iCurrentDisplayable) |
|
594 { |
|
595 iCurrentDisplayable->DrawNow(); |
|
596 } |
|
597 appUi->stopStartScreen(); |
597 } |
598 } |
598 } |
599 } |
599 } |
600 } |
600 |
601 |
601 void CMIDToolkit::SendToBackground() |
602 void CMIDToolkit::SendToBackground() |
603 LCDUI_DEBUG("**RB**"); |
604 LCDUI_DEBUG("**RB**"); |
604 |
605 |
605 if (mFirst) |
606 if (mFirst) |
606 { |
607 { |
607 java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi(); |
608 java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi(); |
608 appUi->stopStartScreen(); |
609 appUi->stopStartScreen(false); // no screenshot |
609 mFirst = EFalse; |
610 mFirst = EFalse; |
610 } |
611 } |
611 iMidletRequestedBg = ETrue; |
612 iMidletRequestedBg = ETrue; |
612 SetOrdinalPosition(KWgOrdinalBackground); |
613 SetOrdinalPosition(KWgOrdinalBackground); |
613 } |
614 } |