378 { |
378 { |
379 // Without lens cover support, always start to primary camera |
379 // Without lens cover support, always start to primary camera |
380 CamUtility::GetPsiInt( ECamPsiPrimaryCameraOrientation, orientation ); |
380 CamUtility::GetPsiInt( ECamPsiPrimaryCameraOrientation, orientation ); |
381 } |
381 } |
382 |
382 |
383 // Finish engine construction |
|
384 if( uiOrientationOverride ) |
|
385 { |
|
386 iController.CompleteConstructionL(); |
|
387 } |
|
388 |
|
389 if ( orientation == ( TInt ) EAppUiOrientationLandscape ) |
383 if ( orientation == ( TInt ) EAppUiOrientationLandscape ) |
390 { |
384 { |
391 PRINT( _L("Camera <> orientation is landscape ") ) |
385 PRINT( _L("Camera <> orientation is landscape ") ) |
392 iCamOrientation = (ECamHandLeft == iSoftkeyPosition ) |
386 iCamOrientation = (ECamHandLeft == iSoftkeyPosition ) |
393 ? ECamOrientationCamcorderLeft |
387 ? ECamOrientationCamcorderLeft |
394 : ECamOrientationCamcorder; |
388 : ECamOrientationCamcorder; |
395 if( uiOrientationOverride ) |
389 |
396 { |
|
397 //set orientation to CCamera |
|
398 iController.SetCameraOrientationModeL( iLandscapeScreenMode ); |
|
399 // and complete the cameracontroller construction |
|
400 iController.CompleteCameraConstructionL(); |
|
401 } |
|
402 PRINT( _L("Camera <> Calling BaseConstructL") ) |
390 PRINT( _L("Camera <> Calling BaseConstructL") ) |
403 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" ); //CCORAPP_APP_BASE_CONSTRUCT_START |
391 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" ); //CCORAPP_APP_BASE_CONSTRUCT_START |
404 BaseConstructL( EAppOrientationLandscape | EAknEnableSkin | EAknEnableMSK | |
392 BaseConstructL( EAppOrientationLandscape | EAknEnableSkin | EAknEnableMSK | |
405 ENonStandardResourceFile | EAknSingleClickCompatible ); |
393 ENonStandardResourceFile | EAknSingleClickCompatible ); |
406 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" ); //CCORAPP_APP_BASE_CONSTRUCT_END |
394 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" ); //CCORAPP_APP_BASE_CONSTRUCT_END |
407 PRINT( _L("Camera <> BaseConstructL Complete") ) |
395 PRINT( _L("Camera <> BaseConstructL Complete") ) |
|
396 |
|
397 if( uiOrientationOverride ) |
|
398 { |
|
399 // Finish engine construction |
|
400 iController.CompleteConstructionL(); |
|
401 //set orientation to CCamera |
|
402 iController.SetCameraOrientationModeL( iLandscapeScreenMode ); |
|
403 // and complete the cameracontroller construction |
|
404 iController.CompleteCameraConstructionL(); |
|
405 } |
408 } |
406 } |
409 else |
407 else |
410 { |
408 { |
411 PRINT( _L("Camera <> orientation is portrait") ) |
409 PRINT( _L("Camera <> orientation is portrait") ) |
412 iCamOrientation = ECamOrientationPortrait; |
410 iCamOrientation = ECamOrientationPortrait; |
413 if( uiOrientationOverride ) |
411 |
414 { |
|
415 //set orientation to CCamera |
|
416 iController.SetCameraOrientationModeL( iPortraitScreenMode ); |
|
417 // and complete the cameracontroller construction |
|
418 iController.CompleteCameraConstructionL(); |
|
419 } |
|
420 PRINT( _L("Camera <> Calling BaseConstructL") ) |
412 PRINT( _L("Camera <> Calling BaseConstructL") ) |
421 OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" ); |
413 OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" ); |
422 BaseConstructL( EAppOrientationPortrait | EAknEnableSkin | EAknEnableMSK | |
414 BaseConstructL( EAppOrientationPortrait | EAknEnableSkin | EAknEnableMSK | |
423 ENonStandardResourceFile ); |
415 ENonStandardResourceFile ); |
424 OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" ); |
416 OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" ); |
425 PRINT( _L("Camera <> BaseConstructL Complete") ) |
417 PRINT( _L("Camera <> BaseConstructL Complete") ) |
|
418 |
|
419 if( uiOrientationOverride ) |
|
420 { |
|
421 // Finish engine construction |
|
422 iController.CompleteConstructionL(); |
|
423 //set orientation to CCamera |
|
424 iController.SetCameraOrientationModeL( iPortraitScreenMode ); |
|
425 // and complete the cameracontroller construction |
|
426 iController.CompleteCameraConstructionL(); |
|
427 } |
426 } |
428 } |
427 |
429 |
428 PERF_EVENT_END_L2( EPerfEventAvkonUIConstruction ); |
430 PERF_EVENT_END_L2( EPerfEventAvkonUIConstruction ); |
429 |
431 |
430 #if !defined (__WINSCW__) |
432 #if !defined (__WINSCW__) |
2383 R_CAM_VIDEO_PRECAPTURE_TOOLBAR_LANDSCAPE ); |
2385 R_CAM_VIDEO_PRECAPTURE_TOOLBAR_LANDSCAPE ); |
2384 // Add toolbar observer. Needed in first boot to secondary |
2386 // Add toolbar observer. Needed in first boot to secondary |
2385 SetPreCaptureMode( ECamPreCapViewfinder ); |
2387 SetPreCaptureMode( ECamPreCapViewfinder ); |
2386 } |
2388 } |
2387 iFirstBoot = EFalse; |
2389 iFirstBoot = EFalse; |
2388 iView->HandleCommandL( ECamCmdPopUpMenuZoom ); |
2390 // Do not show zoom pane when toolbar extension is visible |
|
2391 if ( iController.IsTouchScreenSupported() ) |
|
2392 { |
|
2393 CAknToolbar* toolbar = CurrentFixedToolbar(); |
|
2394 if ( toolbar ) |
|
2395 { |
|
2396 CAknToolbarExtension* toolbarextension = |
|
2397 toolbar->ToolbarExtension(); |
|
2398 if ( toolbarextension && !toolbarextension->IsShown() ) |
|
2399 { |
|
2400 iView->HandleCommandL( ECamCmdPopUpMenuZoom ); |
|
2401 } |
|
2402 } |
|
2403 } |
2389 } |
2404 } |
2390 //Remaining recording time counter update needed when recording has stopped and |
2405 //Remaining recording time counter update needed when recording has stopped and |
2391 //show last captured video setting is off. |
2406 //show last captured video setting is off. |
2392 if( iNaviPaneCounterControl && !ShowPostCaptureView() && iMode == ECamControllerVideo ) |
2407 if( iNaviPaneCounterControl && !ShowPostCaptureView() && iMode == ECamControllerVideo ) |
2393 { |
2408 { |
2537 PRINT( _L( "Camera <> ECamEventMediaFileChanged, notify shutdown" ) ) |
2552 PRINT( _L( "Camera <> ECamEventMediaFileChanged, notify shutdown" ) ) |
2538 HandleControllerEventL( ECamEventExitRequested, KErrNone ); |
2553 HandleControllerEventL( ECamEventExitRequested, KErrNone ); |
2539 } |
2554 } |
2540 } |
2555 } |
2541 } |
2556 } |
2542 |
|
2543 if ( iController.UiConfigManagerPtr() && iController.UiConfigManagerPtr()->IsLocationSupported() ) |
|
2544 { |
|
2545 // If record location setting is on, stop location trail |
|
2546 if ( ECamViewStatePreCapture != iViewState && ECamLocationOn == iController.IntegerSettingValue( ECamSettingItemRecLocation ) ) |
|
2547 { |
|
2548 PRINT( _L("Camera: Gallery notified and non pre-capture view, stop location trail") ) |
|
2549 iController.StopLocationTrail(); |
|
2550 } |
|
2551 else |
|
2552 { |
|
2553 PRINT1( _L("Camera: location trail not in use or view state (%d) is precapture"), iViewState ) |
|
2554 } |
|
2555 } |
|
2556 |
|
2557 break; |
2557 break; |
2558 } |
2558 } |
2559 // ----------------------------------------------------- |
2559 // ----------------------------------------------------- |
2560 case ECamEventCameraChanged: |
2560 case ECamEventCameraChanged: |
2561 { |
2561 { |
3350 if ( iController.UiConfigManagerPtr() |
3350 if ( iController.UiConfigManagerPtr() |
3351 && iController.UiConfigManagerPtr()->IsOrientationSensorSupported() ) |
3351 && iController.UiConfigManagerPtr()->IsOrientationSensorSupported() ) |
3352 // Shut down the Sensor API object. |
3352 // Shut down the Sensor API object. |
3353 iController.UpdateSensorApiL(EFalse); |
3353 iController.UpdateSensorApiL(EFalse); |
3354 |
3354 |
3355 if ( iController.UiConfigManagerPtr() && |
|
3356 iController.UiConfigManagerPtr()->IsLocationSupported() ) |
|
3357 { |
|
3358 // If record location setting is on, stop location trail when losing focus |
|
3359 if ( AppInBackground( EFalse ) ) |
|
3360 { |
|
3361 PRINT( _L("Camera: CCamAppUi::HandleWsEventL focus lost, stop location trail") ) |
|
3362 iController.StopLocationTrail(); |
|
3363 } |
|
3364 } |
|
3365 |
|
3366 #if !defined (__WINSCW__) |
3355 #if !defined (__WINSCW__) |
3367 // relinquish capture keys |
3356 // relinquish capture keys |
3368 UnRegisterCaptureKeys(); |
3357 UnRegisterCaptureKeys(); |
3369 |
3358 |
3370 RArray <TInt> halfCaptureKeys; |
3359 RArray <TInt> halfCaptureKeys; |