diff -r 075425b8d9a4 -r bc10a61bd7d3 radioapp/radioapplication/src/radioapplication.cpp --- a/radioapp/radioapplication/src/radioapplication.cpp Fri Jun 11 13:38:32 2010 +0300 +++ b/radioapp/radioapplication/src/radioapplication.cpp Fri Jun 25 19:09:05 2010 +0300 @@ -19,6 +19,8 @@ #include #include #include +#include +#include // User includes #include "radioapplication.h" @@ -45,7 +47,7 @@ * Constructor */ RadioApplication::RadioApplication( int &argc, char *argv[] ) : - HbApplication( argc, argv ) + HbApplication( argc, argv, Hb::NoSplash ) { // Initializes the radio engine utils if UI logs are entered into the engine log INIT_COMBINED_LOGGER @@ -53,6 +55,10 @@ LOG_TIMESTAMP( "Start radio" ); setApplicationName( hbTrId( "txt_rad_title_fm_radio" ) ); + if ( !XQServiceUtil::isService() ) { + HbSplashScreen::start(); + } + QTimer::singleShot( 0, this, SLOT(init()) ); } @@ -67,14 +73,13 @@ } /*! - *Private slot + * Private slot * */ void RadioApplication::init() { // If started as a service, there is no need for offline-check - const Hb::ActivationReason reason = activateReason(); - bool okToStart = reason == Hb::ActivationReasonService; + bool okToStart = XQServiceUtil::isService(); QScopedPointer deviceInfo( new QtMobility::QSystemDeviceInfo() ); if ( !okToStart ) { @@ -91,9 +96,10 @@ if ( okToStart ) { - // MainWindow needs to be alive to be able to show the offline query dialog. - // The window is only constructed half-way at this point because we may need to shut down if - // offline usage is not allowed + // Try to optimize startup time by launching the radio server process as soon as possible. + // This way the server and UI are being initialized at the same time and the startup is faster. +// RadioUiEngine::launchRadioServer(); + mMainWindow.reset( new RadioWindow() ); CREATE_WIN32_TEST_WINDOW