242 // ----------------------------------------------------------------------------- |
242 // ----------------------------------------------------------------------------- |
243 // |
243 // |
244 void CCamUserSceneSetupViewBase::HandleForegroundEventL( TBool aForeground ) |
244 void CCamUserSceneSetupViewBase::HandleForegroundEventL( TBool aForeground ) |
245 { |
245 { |
246 PRINT1( _L("Camera => CCamUserSceneSetupViewBase::HandleForegroundEventL %d"), aForeground ); |
246 PRINT1( _L("Camera => CCamUserSceneSetupViewBase::HandleForegroundEventL %d"), aForeground ); |
|
247 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
247 if ( aForeground ) |
248 if ( aForeground ) |
248 { |
249 { |
249 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
250 // if foreground event is received while in videocall, go to standby with error |
250 // if foreground event is received while in videocall, go to standby with error |
251 if ( iController.InVideocallOrRinging() && ECamNoOperation == iController.CurrentOperation() ) |
251 if ( iController.InVideocallOrRinging() && ECamNoOperation == iController.CurrentOperation() ) |
252 { |
252 { |
253 ExitAllModesL(); |
253 ExitAllModesL(); |
254 appUi->SetStandbyStatus( KErrInUse ); |
254 appUi->SetStandbyStatus( KErrInUse ); |
284 // the engine as the application is really in the background and the resources |
284 // the engine as the application is really in the background and the resources |
285 // need to be released |
285 // need to be released |
286 } |
286 } |
287 } |
287 } |
288 // To background |
288 // To background |
289 else |
289 else if( !aForeground && appUi->AppInBackground( EFalse ) ) |
290 { |
290 { |
291 PRINT( _L("Camera <> CCamUserSceneSetupViewBase::HandleForegroundEventL dec engine count") ); |
291 PRINT( _L("Camera <> CCamUserSceneSetupViewBase::HandleForegroundEventL dec engine count") ); |
292 // Register that we nolonger need the engine |
292 // Register that we nolonger need the engine |
293 DecrementCameraUsers(); |
293 DecrementCameraUsers(); |
294 } |
294 } |
529 // |
529 // |
530 void CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL( TInt aSetupCommand ) |
530 void CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL( TInt aSetupCommand ) |
531 { |
531 { |
532 PRINT( _L("Camera => CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") ); |
532 PRINT( _L("Camera => CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") ); |
533 iUserSceneSetupModeActive = EFalse; |
533 iUserSceneSetupModeActive = EFalse; |
|
534 SetCaptureSetupModeActive(ETrue); |
534 iContainer->MakeVisible( ETrue ); |
535 iContainer->MakeVisible( ETrue ); |
535 AppUi()->RemoveFromStack( iContainer ); |
536 AppUi()->RemoveFromStack( iContainer ); |
536 iVFRequested=ETrue; |
537 iVFRequested=ETrue; |
537 StartViewFinder(); |
538 StartViewFinder(); |
538 iController.StartIdleTimer(); |
539 iController.StartIdleTimer(); |
539 |
540 |
540 SetCaptureSetupModeActive(ETrue); |
541 |
541 |
|
542 // Remove the view's main container, and add the capture setup |
542 // Remove the view's main container, and add the capture setup |
543 // control associated with the input command to the container stack. |
543 // control associated with the input command to the container stack. |
544 CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( aSetupCommand, ETrue ); |
544 CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( aSetupCommand, ETrue ); |
545 StatusPane()->MakeVisible( EFalse ); |
545 StatusPane()->MakeVisible( EFalse ); |
546 PRINT( _L("Camera <= CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") ); |
546 PRINT( _L("Camera <= CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") ); |