# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277122777 -10800 # Node ID e32fcfe0045f2b02b206009695bd299c62ddd544 # Parent 8f559c47d7fd3984201521e711e811e7ae96cb2b Revision: 201023 Kit: 2010125 diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/build/cameraapp.mmp --- a/camerauis/cameraapp/build/cameraapp.mmp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/build/cameraapp.mmp Mon Jun 21 15:19:37 2010 +0300 @@ -358,7 +358,7 @@ LIBRARY thumbnailmanager.lib LIBRARY accclient.lib LIBRARY accpolicy.lib - +LIBRARY akncapserverclient.lib // --------------------------------------------------------------------------- #ifdef FORCE_DUMMY_ENGINE diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/GsCamcorderPlugin/inc/CamLocationSettingContainer.h --- a/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/CamLocationSettingContainer.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/CamLocationSettingContainer.h Mon Jun 21 15:19:37 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -213,7 +213,6 @@ // The text shown as the title of the container HBufC16* iTextTitle; - MTouchFeedback* iFeedback; // not own TBool iActivateOnTouchRelease; }; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h --- a/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h Mon Jun 21 15:19:37 2010 +0300 @@ -295,7 +295,6 @@ // Configuration Manager CCamConfiguration* iConfiguration; - MTouchFeedback* iFeedback; // not own }; #endif // GSCAMQUALITYSETTINGCONTAINER_H diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp --- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -264,8 +264,11 @@ { if( ( driveStatus & DriveInfo::EDrivePresent) == DriveInfo::EDrivePresent ) { - includedMedias |= AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; - driveCount++; + if( ( driveStatus & DriveInfo::EDriveRemovable ) != DriveInfo::EDriveRemovable ) + { + includedMedias |= AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; + driveCount++; + } } } } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamQualitySettingContainer.cpp --- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamQualitySettingContainer.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamQualitySettingContainer.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -187,10 +187,7 @@ iLayoutSettingDescLines.Reset(); iEnumArray.Reset(); - if ( iFeedback ) - { - iFeedback->RemoveFeedbackForControl( iSlider ); - } + delete iSlider; delete iTextTitle; delete iTextTopSubtitle; @@ -287,13 +284,7 @@ AknTextUtils::WrapToArrayL( ( *iDescArray )[iSelectedQuality], layout.TextRect().Width(), *( layout.Font() ), - *iCurrentDescLineArray ); - iFeedback = MTouchFeedback::Instance(); - if ( iFeedback ) - { - iFeedback->SetFeedbackArea( iSlider, 0, iSlider->Rect(), - ETouchFeedbackBasic, ETouchEventStylusDown ); - } + *iCurrentDescLineArray ); } // ----------------------------------------------------------------------------- diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp --- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -263,8 +263,11 @@ { if( ( driveStatus & DriveInfo::EDrivePresent) == DriveInfo::EDrivePresent ) { - includedMedias |= AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; - driveCount++; + if( ( driveStatus & DriveInfo::EDriveRemovable ) != DriveInfo::EDriveRemovable ) + { + includedMedias |= AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; + driveCount++; + } } } } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager.confml Binary file camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager.confml has changed diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/common/inc/Cam.hrh --- a/camerauis/cameraapp/generic/common/inc/Cam.hrh Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/common/inc/Cam.hrh Mon Jun 21 15:19:37 2010 +0300 @@ -132,7 +132,9 @@ ECamCmdToggleCourtesyUI, ECamCmdRedrawScreen, - + ECamCmdRedrawVideoTime, + ECamCmdRedrawZoom, + ECamCmdToggleVideoFlash, ECamCmdCaptureSetupFlashVideo, ECamCmdPrintIntent, diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/common/src/CamCaptureSetupListBoxModel.cpp --- a/camerauis/cameraapp/generic/common/src/CamCaptureSetupListBoxModel.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/common/src/CamCaptureSetupListBoxModel.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -283,14 +283,14 @@ CleanupClosePushL( supportedItems ); supportedItems.Reset(); - // just for flash to start with - if( aSettingItem == ECamSettingItemDynamicPhotoFlash ) - { + // just for flash to start with + if( aSettingItem == ECamSettingItemDynamicPhotoFlash ) + { #ifndef CAMERAAPP_PLUGIN_BUILD - if ( dynamicSettings ) - { - dynamicSettings->SupportedFlashModeSettingsL( supportedItems ); - } + if ( dynamicSettings ) + { + dynamicSettings->SupportedFlashModeSettingsL( supportedItems ); + } #endif //CAMERAAPP_PLUGIN_BUILD } else if( ECamSettingItemDynamicPhotoWhiteBalance == aSettingItem || @@ -304,7 +304,8 @@ #endif //CAMERAAPP_PLUGIN_BUILD } else if ( ECamSettingItemDynamicPhotoColourFilter == aSettingItem || - ECamSettingItemDynamicVideoColourFilter == aSettingItem ) + ECamSettingItemDynamicVideoColourFilter == aSettingItem || + ECamSettingItemUserSceneColourFilter == aSettingItem ) { #ifndef CAMERAAPP_PLUGIN_BUILD if ( dynamicSettings ) diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamAppController.h --- a/camerauis/cameraapp/generic/inc/CamAppController.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamAppController.h Mon Jun 21 15:19:37 2010 +0300 @@ -2277,11 +2277,16 @@ */ void HandlePendingHdmiEvent(); - /** - * Returns ETrue when scene mode is forced to - * "Automatic" by secondary camera - */ - TBool SceneModeForcedBySecondaryCamera(); + /** + * Returns ETrue when scene mode is forced to + * "Automatic" by secondary camera + */ + TBool SceneModeForcedBySecondaryCamera(); + + /** + * Set value defining if capturing with touch capture button + */ + void SetTouchCapture( TBool aTouchCapture ); private: @@ -2680,6 +2685,8 @@ TCamHdmiEvent iPendingHdmiEvent; TBool iSceneModeForcedBySecondaryCamera; + + TBool iTouchCapture; }; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamAppUi.h --- a/camerauis/cameraapp/generic/inc/CamAppUi.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamAppUi.h Mon Jun 21 15:19:37 2010 +0300 @@ -1057,6 +1057,11 @@ * @return Pointer to CCamStartupLogoController or NULL. */ CCamStartupLogoController* StartupLogoController(); + + /** + * Get a pointer to the NaviProgressBarModel. + */ + CCamNaviProgressBarModel* NaviProgressBarModel(); private: // New functions @@ -1425,6 +1430,13 @@ * @return void */ void SetViewFinderInTransit(TBool aInTransit); + + /** + * Turns screen back visible if leave has occured. + * @param aAny Pointer to CamAppUi instance + * @return void + */ + static void CleanupBlankScreen( TAny* aAny ); public: //MCamAddToAlbumObserver diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h --- a/camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupContainer.h Mon Jun 21 15:19:37 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -206,7 +206,6 @@ TBool iActivateOnTouchRelease; TBool iFullScreenVF; - MTouchFeedback* iFeedback; // not own TRect iLayoutAreaRect; }; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h --- a/camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamInfoListBoxContainer.h Mon Jun 21 15:19:37 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -242,8 +242,6 @@ TBool iActivateOnTouchRelease; - MTouchFeedback* iFeedback; // not own - TBool iSkinnedBackGround; }; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamNaviProgressBarModel.h --- a/camerauis/cameraapp/generic/inc/CamNaviProgressBarModel.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamNaviProgressBarModel.h Mon Jun 21 15:19:37 2010 +0300 @@ -104,6 +104,12 @@ * @param aExtent New extent */ void SetExtentL( const TRect& aExtent ); + + /** + * Returns the rect used for progress bar and + * elapsed/remaining videotime + */ + TRect ProgPaneRect(); protected: @@ -253,6 +259,8 @@ TAknLayoutText iElapsedTimeTextLayout; TAknLayoutText iRemainingTimeTextLayout; + TRect iProgPaneRect; + // own CCamTextItem* iElapsedTimeTextItem; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/CamShootingModeContainer.h --- a/camerauis/cameraapp/generic/inc/CamShootingModeContainer.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/CamShootingModeContainer.h Mon Jun 21 15:19:37 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -319,7 +319,6 @@ TInt iTooltipIndex; TBool iActivateOnTouchRelease; - MTouchFeedback* iFeedback; // not own }; diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/inc/camtextitem.h --- a/camerauis/cameraapp/generic/inc/camtextitem.h Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/inc/camtextitem.h Mon Jun 21 15:19:37 2010 +0300 @@ -78,6 +78,12 @@ * @param aBitmapContext Graphics context to draw into. */ void Draw( CBitmapContext& aBitmapContext ) const; + + /** + * Return the rect of the textitem + * + */ + TRect Rect(); private: diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamAppController.cpp --- a/camerauis/cameraapp/generic/src/CamAppController.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamAppController.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -3094,6 +3094,7 @@ iNoBurstCancel = EFalse; iKeyUP = EFalse; iAFCancelInProgress = EFalse; + iTouchCapture = EFalse; // ------------------------------------------------------- if( ECamTriIdle != iCameraController->ViewfinderState() ) @@ -9035,9 +9036,21 @@ TRAP( aStatus, RestoreSettingsToCameraL() ); } // fixed toolbar is used only with touch devices - if ( IsTouchScreenSupported() ) + if ( IsTouchScreenSupported() && appUi ) { - appUi->SetToolbarVisibility();// avoid flickering in settings view + CAknToolbar* toolbar = appUi->CurrentFixedToolbar(); + if ( toolbar ) + { + CAknToolbarExtension* toolbarextension = toolbar->ToolbarExtension(); + if ( toolbarextension && toolbarextension->IsShown() ) + { + appUi->SetToolbarVisibility();// avoid flickering in settings view + } + else + { + appUi->SubmergeToolbar(); + } + } PRINT( _L( "Camera <> SetToolbarVisibility done ") ); } // else use AP @@ -9137,6 +9150,15 @@ OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_CAPTURE_START 1" ); OstTrace0( CAMERAAPP_PERFORMANCE, DUP6_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SERIAL_SHOOTING 1" ); + // When image capture is started with touch capture button, a short + // delay is added after AF completes, but before capturing starts to + // avoid blurry screen sometimes when VF is frozen and before the + // snapshot is drawn. Delay also helps to see focus reticule. + if( iTouchCapture ) + { + User::After( 50000 ); + iTouchCapture = EFalse; + } Capture(); } break; @@ -11580,6 +11602,15 @@ { return iSceneModeForcedBySecondaryCamera; } - + +// --------------------------------------------------------------------------- +// CCamAppController::SetTouchCapture +// +// --------------------------------------------------------------------------- +// +void CCamAppController::SetTouchCapture( TBool aTouchCapture ) + { + iTouchCapture = aTouchCapture; + } // End of File diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamAppui.cpp --- a/camerauis/cameraapp/generic/src/CamAppui.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamAppui.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -1230,6 +1230,7 @@ { iTargetMode = ECamControllerImage; } + SubmergeToolbar(); //Fix flickering when switching modes. TrySwitchViewL(); @@ -1410,6 +1411,7 @@ iTargetMode = ECamControllerVideo; SetSuppressUIRiseOnViewfinderStart( EFalse ); PRINT( _L("Camera => CCamAppUi::HandleCommandL Try switch to video mode")); + SubmergeToolbar(); TrySwitchViewL(); } break; @@ -1872,6 +1874,28 @@ } break; // ----------------------------------------------------- + case ECamCmdRedrawVideoTime: + { + if( !iProcessingScreenRedraw && iView ) + { + iProcessingScreenRedraw = ETrue; + iView->HandleCommandL(ECamCmdRedrawVideoTime); + iProcessingScreenRedraw = EFalse; + } + } + break; + // ----------------------------------------------------- + case ECamCmdRedrawZoom: + { + if( !iProcessingScreenRedraw && iView ) + { + iProcessingScreenRedraw = ETrue; + iView->HandleCommandL(ECamCmdRedrawZoom); + iProcessingScreenRedraw = EFalse; + } + } + break; + // ----------------------------------------------------- case ECamCmdShootSetup: // fall through case ECamCmdFlash: // fall through case ECamCmdAddAudio: // fall through @@ -3063,6 +3087,12 @@ case EEventFocusGained: { PRINT( _L("Camera <> CCamAppUi::HandleWsEventL: case EEventFocusGained") ); + RAknUiServer* capServ = CAknSgcClient::AknSrv(); + CleanupStack::PushL( TCleanupItem( CleanupBlankScreen, this ) ); + if ( iPretendExit ) + { + capServ->BlankScreen(); + } iReturningFromPretendExit = iPretendExit; TBool uiOverride = iController.UiConfigManagerPtr() && iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported(); @@ -3128,6 +3158,8 @@ StandbyStatus() == KErrInUse ) { // We call the base class and return + capServ->UnblankScreen(); + CleanupStack::Pop(); CAknAppUi::HandleWsEventL( aEvent, aDestination ); return; } @@ -3143,6 +3175,8 @@ } iPretendExit = EFalse; // Go to standby with error + capServ->UnblankScreen(); + CleanupStack::Pop(); HandleStandbyEventL( KErrInUse ); // We call the base class and return CAknAppUi::HandleWsEventL( aEvent, aDestination ); @@ -3197,6 +3231,8 @@ { ActivateLocalViewL ( iViaPlayerUid ); // We call the base class and return + capServ->UnblankScreen(); + CleanupStack::Pop(); CAknAppUi::HandleWsEventL( aEvent, aDestination ); return; } @@ -3214,6 +3250,8 @@ // iPretendExit flag needs to be reset before returning, otherwise // views think we are still in exit state and will not reserve camera iPretendExit = EFalse; + capServ->UnblankScreen(); + CleanupStack::Pop(); CAknAppUi::HandleWsEventL( aEvent, aDestination ); return; } @@ -3235,6 +3273,8 @@ iTargetViewState = ECamViewStateSettings; } TrySwitchViewL(); + capServ->UnblankScreen(); + CleanupStack::Pop(); CAknAppUi::HandleWsEventL( aEvent, aDestination ); return; } @@ -3273,6 +3313,8 @@ if ( memError && freeMemory < iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained() ) { PRINT( _L("Camera <> CCamAppUi::HandleWsEvent ECamEventFocusGained memory too low. Exiting") ); + capServ->UnblankScreen(); + CleanupStack::Pop(); CloseAppL(); PRINT( _L("Camera <= CCamAppUi::HandleWsEvent ECamEventFocusGained memory too low. Exiting") ); return; @@ -3302,6 +3344,8 @@ // check if exit is required if ( iController.CheckExitStatus() ) { + capServ->UnblankScreen(); + CleanupStack::Pop(); InternalExitL(); PRINT( _L("Camera <= CCamAppUi::HandleWsEventL, internal exit") ) return; @@ -3400,7 +3444,8 @@ if ( ECamViewStatePreCapture == iViewState && ECamPreCapViewfinder == iPreCaptureMode && ( !( iSelfTimer && iSelfTimer->IsActive() ) ) && - iController.CurrentOperation() != ECamCapturing ) + iController.CurrentOperation() != ECamCapturing && + iController.CurrentOperation() != ECamPaused ) { SetToolbarVisibility(); } @@ -3429,6 +3474,8 @@ } } + capServ->UnblankScreen(); + CleanupStack::Pop(); if (iStartupLogoController && iReturningFromPretendExit) { iStartupLogoController->ShowLogo(); @@ -3439,7 +3486,13 @@ case EEventFocusLost: { PRINT( _L("Camera <> CCamAppUi::HandleWsEventL: case EEventFocusLost") ); - + // Stop VF early to reduce load + if( AppInBackground( EFalse ) + && iViewState == ECamViewStatePreCapture + && iMode == ECamControllerVideo ) + { + iController.StopViewFinder(); + } //When go to background from video post caputure view, we need to hide the toolbar to avoid icons overlap if( AppInBackground( EFalse ) && iViewState == ECamViewStatePostCapture @@ -5468,6 +5521,7 @@ { iStartupLogoController->ShowLogo(); } + SubmergeToolbar(); //For preventing toolbar to show up when starting camera again. PRINT( _L("Camera <= CCamAppUi::InternalExitL") ); OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_INTERNALEXITL, "e_CCamAppUi_InternalExitL 0" ); @@ -7121,7 +7175,7 @@ if ( aRedraw && IsDirectViewfinderActive() ) { - TRAP_IGNORE(HandleCommandL(ECamCmdRedrawScreen)); + TRAP_IGNORE(HandleCommandL(ECamCmdRedrawZoom)); } PRINT( _L("Camera <= CCamAppUi::ShowZoomPane" )) } @@ -7147,7 +7201,7 @@ if ( aRedraw && IsDirectViewfinderActive() ) { - TRAP_IGNORE( HandleCommandL(ECamCmdRedrawScreen ) ); + TRAP_IGNORE( HandleCommandL(ECamCmdRedrawZoom ) ); } PRINT( _L("Camera <= CCamAppUi::HideZoomPane" )) } @@ -8578,7 +8632,7 @@ PRINT( _L("Camera <> call CCamAppController::LoadStaticSettingsL..") ) iController.LoadStaticSettingsL( IsEmbedded() ); - iInternalStorage = static_cast(iController.IntegerSettingValue( ECamSettingItemPhotoMediaStorage )); + iInternalStorage = static_cast(iController.IntegerSettingValueUnfiltered( ECamSettingItemPhotoMediaStorage )); // store the userscene settings iController.StoreUserSceneSettingsL(); @@ -8909,4 +8963,27 @@ } +// ----------------------------------------------------------------------------- +// CCamAppUi::NaviProgressBarModel +// ----------------------------------------------------------------------------- +// +CCamNaviProgressBarModel* CCamAppUi::NaviProgressBarModel() + { + return iNaviProgressBarModel; + } + + +void CCamAppUi::CleanupBlankScreen( TAny* aAny ) + { + PRINT(_L("Camera => CCamAppUi::CleanupBlankScreen.")); + CCamAppUi* appui = static_cast( aAny ); + RAknUiServer* capServ = CAknSgcClient::AknSrv(); + if( capServ ) + { + capServ->UnblankScreen(); + appui->Exit(); + } + PRINT(_L("Camera <= CCamAppUi::CleanupBlankScreen.")); + } + // End of File diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp --- a/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -89,10 +89,7 @@ iController.ViewfinderWindowDeleted( &Window() ); iController.RemoveCameraObserver( this ); - if ( iFeedback ) - { - iFeedback->RemoveFeedbackForControl( iCaptureSetupControl ); - } + delete iCaptureSetupControl; delete iTitleText; PRINT( _L("Camera <= ~CCamCaptureSetupContainer") ); @@ -107,6 +104,7 @@ { PRINT( _L("Camera => CCamCaptureSetupContainer::ConstructL ") ); + SetMopParent( &iView ); CCamContainerBase::BaseConstructL( aRect ); if ( iController.IsTouchScreenSupported() ) { @@ -193,15 +191,6 @@ listbox->ScrollBarFrame()->DrawScrollBarsNow(); listbox->SetListBoxObserver(this); } - - iFeedback = MTouchFeedback::Instance(); - if ( iFeedback ) - { - iFeedback->SetFeedbackArea( iCaptureSetupControl, 0, - iCaptureSetupControl->Rect(), - ETouchFeedbackBasic, - ETouchEventStylusDown ); - } iCaptureSetupControl->MakeVisible( ETrue ); iCaptureSetupControl->SetFocus( EFalse, EDrawNow ); diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp --- a/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -560,7 +560,6 @@ } iCaptureSetupContainer = CCamCaptureSetupContainer::NewL( iController, *this, *iCaptureSetupControlHandler, rect, aFullScreenVF ); - iCaptureSetupContainer->SetMopParent( this ); appUi->AddToStackL( *this, iCaptureSetupContainer ); iCaptureSetupContainer->ActivateL(); iCaptureSetupContainer->DrawNow(); diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp --- a/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -85,11 +85,6 @@ iDescArray.ResetAndDestroy(); iExplTxtLinesLayout.Close(); - if ( iFeedback ) - { - iFeedback->RemoveFeedbackForControl( iListBox ); - } - delete iListBox; if ( iTooltipController ) @@ -239,13 +234,7 @@ iTooltipController->SetTimeDelayBeforeShow( KInfoTooltipDelay ); iTooltipController->SetTimePopupInView( KInfoTooltipDisplayTime ); - - iFeedback = MTouchFeedback::Instance(); - if ( iFeedback ) - { - iFeedback->SetFeedbackArea( iListBox, 0, iListBox->Rect(), - ETouchFeedbackBasic, ETouchEventStylusDown ); - } + iController.SetViewfinderWindowHandle( &Window() ); PRINT(_L("Camera <= CCamInfoListBoxContainer::ConstructL") ) } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamNaviProgressBarControl.cpp --- a/camerauis/cameraapp/generic/src/CamNaviProgressBarControl.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamNaviProgressBarControl.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -153,7 +153,7 @@ if ( appUi && appUi->IsDirectViewfinderActive() ) { - TRAP_IGNORE(appUi->HandleCommandL( ECamCmdRedrawScreen )); + TRAP_IGNORE(appUi->HandleCommandL( ECamCmdRedrawVideoTime )); } else { diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamNaviProgressBarModel.cpp --- a/camerauis/cameraapp/generic/src/CamNaviProgressBarModel.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamNaviProgressBarModel.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -734,6 +734,12 @@ // Progress bar iProgressBarRect.LayoutRect( progressPaneRect, AknLayoutScalable_Apps::wait_bar_pane_cp07( iconVariant ) ); + + // Minimum progress pane rect for drawing while recording + iProgPaneRect = iRemainingTimeTextItem->Rect(); + iProgPaneRect.BoundingRect( iElapsedTimeTextItem->Rect() ); + iProgPaneRect.BoundingRect( iProgressIconRect.Rect() ); + iProgPaneRect.BoundingRect( iProgressBarRect.Rect() ); } // --------------------------------------------------------- @@ -763,7 +769,13 @@ // Progress bar iProgressBarRect.LayoutRect( progressPaneRect, - AknLayoutScalable_Apps::wait_bar_pane_cp08( 0 ) ); + AknLayoutScalable_Apps::wait_bar_pane_cp08( 0 ) ); + + // Minimum progress pane rect for drawing while recording + iProgPaneRect = iRemainingTimeTextItem->Rect(); + iProgPaneRect.BoundingRect( iElapsedTimeTextItem->Rect() ); + iProgPaneRect.BoundingRect( iProgressIconRect.Rect() ); + iProgPaneRect.BoundingRect( iProgressBarRect.Rect() ); } // --------------------------------------------------------- @@ -795,5 +807,14 @@ iProgressBarRect.LayoutRect( progressPaneRect, AknLayoutScalable_Apps::wait_bar_pane_cp08( 1 ) ); } - + +// --------------------------------------------------------- +// CCamNaviProgressBarModel::ProgPaneRect +// +// --------------------------------------------------------- +TRect CCamNaviProgressBarModel::ProgPaneRect() + { + return iProgPaneRect; + } + // End of File diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp --- a/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -586,6 +586,7 @@ { fixedToolbar->SetDimmed(ETrue); } + fixedToolbar->HideItemsAndDrawOnlyBackground( EFalse ); fixedToolbar->SetToolbarVisibility( ETrue ); } } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp --- a/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -161,7 +161,15 @@ delete iViewFinderBackup; iViewFinderBackup = NULL; iReceivedVfFrame = EFalse; - + if( iIndBlinkTimer ) + { + if( iIndBlinkTimer->IsActive() ) + { + iIndBlinkTimer->Cancel(); + } + delete iIndBlinkTimer; + iIndBlinkTimer = NULL; + } PRINT( _L("Camera <= ~CCamPreCaptureContainerBase" )) } @@ -674,6 +682,10 @@ PRINT( _L("Camera <= CCamPreCaptureContainerBase::OfferKeyEventL .. capture key up handled") ) return EKeyWasConsumed; } + else + { + UpdateCaptureButton(); + } iController.HandlePendingHdmiEvent(); } else @@ -2889,6 +2901,7 @@ buttonActive = ( IsFocused() || iCaptureButtonContainer->IsFocused() ) && ECamNoOperation == iController.CurrentOperation() + && iController.IsViewFinding() && ( ECamControllerImage == mode || ECamControllerVideo == mode ); PRINT1( _L("Camera <> capture button shown:%d"), buttonActive ); diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp --- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -539,9 +539,6 @@ if( iController.IsAppUiAvailable() ) { PRINT( _L( "Camera <> case ECamEventEngineStateChanged" ) ); - // - // if ( iController.EngineState() == ECamEngineStillCapturePrepared || - // iController.EngineState() == ECamEngineVideoCapturePrepared ) if ( ECamCameraPreparedVideo == iController.CameraState() || ECamCameraPreparedImage == iController.CameraState() ) { @@ -555,11 +552,17 @@ // when returning to prepactureview after image deletion. // This will happen only if camera is started directly to portrait // secondary camera i.e. Lens cover feature is supported - TBool noToolbar = (ECamCompleting == iController.CurrentOperation() ) && appUi->IsSecondCameraEnabled(); + TBool noToolbar = ( ECamCompleting == iController.CurrentOperation() ) && appUi->IsSecondCameraEnabled(); + + TBool showVideoModeToolbar = ( ECamCameraPreparedVideo == iController.CameraState() && + ( iController.CurrentOperation() != ECamCapturing && iController.CurrentOperation() != ECamPaused ) ); - if ( ECamCameraPreparedImage == iController.CameraState() && - !appUi->IsBurstEnabled() && !noToolbar - && !iStandbyModeActive ) + TBool precaptureToolbarState = !appUi->IsBurstEnabled() + && !iStandbyModeActive && !appUi->IsInPretendExit(); + + if ( ( ECamCameraPreparedImage == iController.CameraState() || + showVideoModeToolbar ) && + !noToolbar && precaptureToolbarState ) { // Also fixed toolbar might need to be enabled. appUi->SetToolbarVisibility(); diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp --- a/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -105,11 +105,6 @@ iTitleArray.ResetAndDestroy(); iDescArray.ResetAndDestroy(); iExplTxtLinesLayout.Close(); - - if ( iFeedback ) - { - iFeedback->RemoveFeedbackForControl( iListBox ); - } if ( iListBox ) { @@ -275,15 +270,8 @@ iTooltipController->SetTimeDelayBeforeShow( KInfoTooltipDelay ); iTooltipController->SetTimePopupInView( KInfoTooltipDisplayTime ); - - iFeedback = MTouchFeedback::Instance(); - if ( iFeedback ) - { - iFeedback->SetFeedbackArea( iListBox, 0, iListBox->Rect(), - ETouchFeedbackBasic, ETouchEventStylusDown ); - } - PRINT(_L("Camera <= CCamShootingModeContainer::ConstructL") ) + PRINT(_L("Camera <= CCamShootingModeContainer::ConstructL") ) } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp --- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -460,6 +460,7 @@ { case ECamCompleting: { + iController.SetTouchCapture( EFalse ); UpdateCbaL(); break; } @@ -665,6 +666,13 @@ iPreviousControllerOperation = ECamNoOperation; + CAknToolbar* toolbar = Toolbar(); + if ( toolbar ) + { + //Hide toolbar for first camera startup. + toolbar->SetToolbarVisibility(EFalse); + } + CCamPreCaptureViewBase::ConstructL(); } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp --- a/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -473,9 +473,7 @@ // if the view is user scene setup else { - // R_AVKON_SOFTKEYS_OPTIONS_BACK --> - // R_CAM_SOFTKEYS_OPTIONS_BACK__CHANGE - SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_BACK__CHANGE ); + SetSoftKeysL( R_AVKON_SOFTKEYS_BACK ); } PRINT( _L("Camera <= CCamUserSceneSetupViewBase::UpdateCbaL()") ); } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp --- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -638,14 +638,6 @@ void CCamVideoPreCaptureView::ConstructL() { BaseConstructL( ROID(R_CAM_VIDEO_PRE_CAPTURE_VIEW_ID) ); - if(iController.UiConfigManagerPtr()->IsXenonFlashSupported()) - { - CreateAndSetToolbarL(R_CAM_VIDEO_PRECAPTURE_TOOLBAR); - } - else - { - CreateAndSetToolbarL(R_CAM_VIDEO_PRECAPTURE_TOOLBAR_VIDEOLIGHT); - } CCamPreCaptureViewBase::ConstructL(); iHdmiTimer = CCamTimer::NewL( KHdmiTimeout, TCallBack(HdmiTimerCallback, this)); } @@ -1068,6 +1060,25 @@ PERF_EVENT_START_L2( EPerfEventVideoPreCaptureViewActivation ); // Ensure the correct menu is used for the current mode. CCamAppUi* appUi = static_cast( AppUi() ); + // Toolbar is created here. + // fixed toolbar is used only with touch devices + if ( iController.IsTouchScreenSupported() ) + { + CAknToolbar* toolbar = Toolbar(); + if( !toolbar ) + { + PRINT( _L("Camera <> CCamVideoPreCaptureView::DoActivateL - Not toolbar -> Create one" ) ); + if(iController.UiConfigManagerPtr()->IsXenonFlashSupported()) + { + CreateAndSetToolbarL(R_CAM_VIDEO_PRECAPTURE_TOOLBAR); + } + else + { + CreateAndSetToolbarL(R_CAM_VIDEO_PRECAPTURE_TOOLBAR_VIDEOLIGHT); + } + } + } + // fixed toolbar is used only with touch devices if ( iController.IsTouchScreenSupported() ) diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/CamViewBase.cpp --- a/camerauis/cameraapp/generic/src/CamViewBase.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/CamViewBase.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -39,6 +39,7 @@ #include "CamWaitDialog.h" #include "CamCommandHandlerAo.h" #include "CameraUiConfigManager.h" +#include "CamNaviProgressBarModel.h" static const TRect KCamCbaHiddenRect = TRect(640,640,640,640); @@ -122,6 +123,8 @@ void CCamViewBase::HandleCommandL( TInt aCommand ) { PRINT( _L("Camera => CCamViewBase::HandleCommandL")) + CCamAppUi* appUi = static_cast( AppUi() ); + switch(aCommand) { case ECamCmdInternalExit: @@ -155,7 +158,40 @@ } } break; - + + case ECamCmdRedrawVideoTime: + { + if( iContainer ) + { + if(appUi) + { + iContainer->DrawNow( appUi->NaviProgressBarModel()->ProgPaneRect() ); + } + else + { + iContainer->DrawDeferred(); + } + } + } + break; + + case ECamCmdRedrawZoom: + { + if( iContainer ) + { + if(appUi) + { + iContainer->DrawNow( appUi->ZoomPane()->Rect() ); + } + else + { + PRINT( _L("Camera <> CCamViewBase::HandleCommandL ECamCmdRedrawZoom zoomRect")) + iContainer->DrawDeferred(); + } + } + } + break; + default: { AppUi()->HandleCommandL( aCommand ); diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/camcapturebuttoncontainer.cpp --- a/camerauis/cameraapp/generic/src/camcapturebuttoncontainer.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/camcapturebuttoncontainer.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -184,6 +184,7 @@ } else { + iController.SetTouchCapture( ETrue ); iView.HandleCommandL( ECamCmdCaptureImage ); } } diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp --- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -4169,6 +4169,10 @@ if( KErrNone == aStatus ) SetFlags ( iInfo.iState, ECamReserved ); else ClearFlags( iInfo.iState, ECamReserved ); + // Make sure our priority is not downgraded + CEikonEnv* env = CEikonEnv::Static(); + env->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled); + #ifdef CAMERAAPP_CAE_FIX if( ECamModeChangeVideo2Image == iModeChange ) { diff -r 8f559c47d7fd -r e32fcfe0045f camerauis/cameraapp/generic/src/camtextitem.cpp --- a/camerauis/cameraapp/generic/src/camtextitem.cpp Wed Jun 09 09:21:41 2010 +0300 +++ b/camerauis/cameraapp/generic/src/camtextitem.cpp Mon Jun 21 15:19:37 2010 +0300 @@ -107,3 +107,13 @@ } } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +TRect CCamTextItem::Rect() + { + return iLayout.TextRect(); + } +