--- a/camerauis/cameraxui/cxui/src/cxuiviewmanager.cpp Fri Aug 06 10:03:37 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiviewmanager.cpp Mon Aug 23 13:50:05 2010 +0300
@@ -169,9 +169,16 @@
switch (newState) {
case CxuiApplicationState::Normal:
- // Disable raising to foreground with capture key.
- disconnect(mKeyHandler, SIGNAL(captureKeyPressed()), this, SLOT(toForeground()));
-
+ // If camera is in embedded mode, we need to start
+ // listening to key events again
+ if (CxuiServiceProvider::isCameraEmbedded()){
+ mKeyHandler->startListeningKeys();
+ } else {
+ // If in standalone mode, we disable raising to
+ // foreground with capture key.
+ disconnect(mKeyHandler, SIGNAL(captureKeyPressed()),
+ this, SLOT(toForeground()));
+ }
connectSignals(view);
CX_DEBUG(("CxuiViewManager - emitting normalStateEntered"));
@@ -193,8 +200,16 @@
if (newState == CxuiApplicationState::Background) {
// Moved to background.
- // Bring application back to foreground by capture key press
- connect(mKeyHandler, SIGNAL(captureKeyPressed()), this, SLOT(toForeground()));
+ // If we're in embedded mode, we should stop listening to camera key
+ // events
+ if (CxuiServiceProvider::isCameraEmbedded()){
+ mKeyHandler->stopListeningKeys();
+ } else {
+ // If not in embedded mode, then we bring application back to
+ // foreground by capture key press
+ connect(mKeyHandler, SIGNAL(captureKeyPressed()),
+ this, SLOT(toForeground()));
+ }
}
break;
}