camerauis/cameraxui/cxui/src/main.cpp
changeset 45 24fd82631616
parent 43 0e652f8f1fbd
child 51 ccc0e7e3344f
--- a/camerauis/cameraxui/cxui/src/main.cpp	Thu Jul 15 01:55:05 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/main.cpp	Fri Jul 23 11:35:41 2010 +0300
@@ -21,6 +21,7 @@
 #include <QLocale>
 #include <HbTranslator>
 #include <hbmainwindow.h>
+#include <xqserviceutil.h>
 
 #ifdef Q_OS_SYMBIAN
 #include <coemain.h>
@@ -72,7 +73,11 @@
     CxeEngine *engine = CxeEngine::createEngine();
     OstTrace0( camerax_performance, DUP8__MAIN, "msg: e_CX_CREATE_ENGINE 0" );
 
-    if (app.activateReason() == Hb::ActivationReasonService) {
+    if (app.activateReason() == Hb::ActivationReasonService ||
+        // @todo: There's a bug in orbit and we never get Hb::ActivationReasonService as
+        // activation reason. Use XQServiceUtil to determine if starting service as
+        // a workaround for now
+        XQServiceUtil::isService()) {
         CX_DEBUG(("CxUI: Camera started as service"));
         // Embedded mode.  Engine is inited to correct mode
         // by service provider when request arrives