Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:41:04 +0200
branchRCL_3
changeset 11 792dfc98fb3b
parent 7 dbec5787fa68
child 12 8c55c525d5d7
Revision: 201007 Kit: 201008
camerauis/cameraapp/build/cameraapp.mmp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsView.cpp
camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh
camerauis/cameraapp/generic/inc/CamAppController.h
camerauis/cameraapp/generic/inc/CamPreCaptureContainerBase.h
camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h
camerauis/cameraapp/generic/inc/cameracontroller/camcameracontroller.h
camerauis/cameraapp/generic/src/CamAppController.cpp
camerauis/cameraapp/generic/src/CamAppui.cpp
camerauis/cameraapp/generic/src/CamImageSaveActive.cpp
camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp
camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp
camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamViewBase.cpp
camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp
camerauis/cameraapp/loc/cam.loc
camerauis/cameraapp/traces/OstTraceDefinitions.h
--- a/camerauis/cameraapp/build/cameraapp.mmp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/build/cameraapp.mmp	Fri Mar 12 15:41:04 2010 +0200
@@ -292,6 +292,7 @@
 LIBRARY CFServices.lib
 LIBRARY ActivePalette.lib
 LIBRARY aknlayout2.lib
+LIBRARY akntouchgesturefw.lib
 LIBRARY accmonitor.lib
 
 // Remote Controller framework
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -270,9 +270,8 @@
         }
       else
         {
-        settingItem = 
-            new( ELeave ) CAknEnumeratedTextPopupSettingItem( aIdentifier, 
-                                                              valueId );
+        settingItem = new( ELeave ) 
+            CAknBinaryPopupSettingItem( aIdentifier, valueId );
         }
       }
       break;
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -217,9 +217,8 @@
             }
           else
             {
-            settingItem = 
-                new( ELeave ) CAknEnumeratedTextPopupSettingItem( aIdentifier, 
-                                                                  valueId );
+            settingItem = new( ELeave ) 
+                CAknBinaryPopupSettingItem( aIdentifier, valueId );
             }
           }
       	  break;
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsView.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsView.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -27,7 +27,7 @@
 #include <barsread.h>
 #include <gscamerapluginrsc.rsg>
 #include <camerasettingsplugin.mbg>
-#include <GSTabHelper.h>
+#include <gstabhelper.h>
 
 #include "CamAppUid.h"
 #include "GSCamcorderPlugin.h"
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh	Fri Mar 12 15:41:04 2010 +0200
@@ -132,12 +132,12 @@
 // Photo scene settings 
 const TInt KCamColorToneEnums[] =
   {
-    { ECamColourFilterColour },
-    { ECamColourFilterBlackAndWhite },
-    { ECamColourFilterSepia },
-    { ECamColourFilterNegative },
-    { ECamColourFilterVivid },
-    { KCamLastSettingItem }
+    ECamColourFilterColour,
+    ECamColourFilterBlackAndWhite,
+    ECamColourFilterSepia,
+    ECamColourFilterNegative,
+    ECamColourFilterVivid,
+    KCamLastSettingItem
   };
 
 const TUint16* const KCamColorToneStrings[] =
@@ -156,12 +156,12 @@
 
 const TInt KCamWhiteBalanceEnums[] =
   {
-    { ECamWhiteBalanceAWB },
-    { ECamWhiteBalanceDaylight },
-    { ECamWhiteBalanceCloudy },
-    { ECamWhiteBalanceTungsten },
-    { ECamWhiteBalanceFlourescent },
-    { KCamLastSettingItem }
+    ECamWhiteBalanceAWB,
+    ECamWhiteBalanceDaylight,
+    ECamWhiteBalanceCloudy,
+    ECamWhiteBalanceTungsten,
+    ECamWhiteBalanceFlourescent,
+    KCamLastSettingItem
   };
 
 const TUint16* const KCamWhiteBalanceStrings[] =
@@ -180,11 +180,11 @@
 */
 const TInt KCamFlashModeEnums[] =
   {
-    { ECamFlashAuto       },
-    { ECamFlashForced     },
-    { ECamFlashAntiRedEye },
-    { ECamFlashOff        },
-    { KCamLastSettingItem }
+    ECamFlashAuto,
+    ECamFlashForced,
+    ECamFlashAntiRedEye,
+    ECamFlashOff,
+    KCamLastSettingItem
   };
 
 const TUint16* const KCamFlashModeStrings[] =
@@ -204,56 +204,56 @@
  */
  const TInt KCamSceneModeEnums[] =
     {
-      { ECamSceneAuto       },
-      { ECamSceneUser       },
-      { ECamSceneMacro      },
-      { ECamScenePortrait   },
-      { ECamSceneScenery    },
-      { ECamSceneSports     },
-      { ECamSceneNight      },
-      { ECamSceneNightPortrait },
-      { ECamSceneNormal },
-      { ECamSceneLowLight },
+      ECamSceneAuto,
+      ECamSceneUser,
+      ECamSceneMacro,
+      ECamScenePortrait,
+      ECamSceneScenery,
+      ECamSceneSports,
+      ECamSceneNight,
+      ECamSceneNightPortrait,
+      ECamSceneNormal,
+      ECamSceneLowLight,
       // Exposure modes for each scene
-      { ECamSceneAEModeAuto },
-      { ECamSceneAEModeNight },
-      { ECamSceneAEModeBacklight },
-      { ECamSceneAEModeCenter },
-      { ECamSceneAEModeSports },
+      ECamSceneAEModeAuto,
+      ECamSceneAEModeNight,
+      ECamSceneAEModeBacklight,
+      ECamSceneAEModeCenter,
+      ECamSceneAEModeSports,
       // AF modes for each scene
-      { ECamSceneAFModeMacro      },
-      { ECamSceneAFPortrait       },
-      { ECamSceneAFModeNormal     },
-      { ECamSceneAFModeInfinity   },
-      { ECamSceneAFModeHyperfocal },
-      { ECamSceneAFModeContinuous },
+      ECamSceneAFModeMacro,
+      ECamSceneAFPortrait,
+      ECamSceneAFModeNormal,
+      ECamSceneAFModeInfinity,
+      ECamSceneAFModeHyperfocal,
+      ECamSceneAFModeContinuous,
       // flash mode
-      { ECamFlashAuto       },
-      { ECamFlashForced     },
-      { ECamFlashAntiRedEye },
-      { ECamFlashOff        },
+      ECamFlashAuto,
+      ECamFlashForced,
+      ECamFlashAntiRedEye,
+      ECamFlashOff,
       // white balance ecam
-      { ECamWhiteBalanceAWB },
-      { ECamWhiteBalanceDaylight },
-      { ECamWhiteBalanceCloudy },
-      { ECamWhiteBalanceTungsten },
-      { ECamWhiteBalanceFlourescent },
+      ECamWhiteBalanceAWB,
+      ECamWhiteBalanceDaylight,
+      ECamWhiteBalanceCloudy,
+      ECamWhiteBalanceTungsten,
+      ECamWhiteBalanceFlourescent,
       // light sensitivity enums
-      { ECamLightSensitivityAuto },
-      { ECamLightSensitivityLow },
-      { ECamLightSensitivityLowMed },
-      { ECamLightSensitivityMed },
-      { ECamLightSensitivityMedHigh },
-      { ECamLightSensitivityHigh },
+      ECamLightSensitivityAuto,
+      ECamLightSensitivityLow,
+      ECamLightSensitivityLowMed,
+      ECamLightSensitivityMed,
+      ECamLightSensitivityMedHigh,
+      ECamLightSensitivityHigh,
       // sharpness modes that ui supports
-      { ECamImageSharpnessNorm },
-      { ECamImageSharpnessSoft },
-      { ECamImageSharpnessHard },
+      ECamImageSharpnessNorm,
+      ECamImageSharpnessSoft,
+      ECamImageSharpnessHard,
       // contrast modes that ui supports
-      { ECamContrastNorm },
-      { ECamContrastPlus },
-      { ECamContrastNeg },
-      { KCamLastSettingItem }
+      ECamContrastNorm,
+      ECamContrastPlus,
+      ECamContrastNeg,
+      KCamLastSettingItem
     }; 
  
 /*
--- a/camerauis/cameraapp/generic/inc/CamAppController.h	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamAppController.h	Fri Mar 12 15:41:04 2010 +0200
@@ -2195,7 +2195,11 @@
          * Stores the UserScene settings
          */
         void StoreUserSceneSettingsL();
-        
+ 
+        /**
+         * Toggles between highest 16:9 and 4:3 quality levels.
+         */
+        TBool ToggleWideScreenQuality( TBool aWide );             
   private:
 
     // -----------------------------------------------------
@@ -2302,6 +2306,14 @@
     * Notify observers about quality change.
     */
     void HandleImageQualitySettingChangeL();
+    
+    /**
+    * Handle change in video quality setting.
+    * Handle stopping viewfinder, re-preparing quality and
+    * restarting viewfinder if viewfinder is running.
+    * Notify observers about quality change.
+     */
+    void HandleVideoQualitySettingChangeL();
 
   // =======================================================
   private:    // Data
--- a/camerauis/cameraapp/generic/inc/CamPreCaptureContainerBase.h	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamPreCaptureContainerBase.h	Fri Mar 12 15:41:04 2010 +0200
@@ -262,6 +262,14 @@
     * Registers the view for Active Palette.
     */
     virtual void SetupActivePaletteL( CCamViewBase* aView );
+    
+    /**
+     * Tells the container to blink the resolution indicator 
+     * when the resolution changes. The flag is reset after 
+     * doing one blinking rountine or can be reset manually by 
+     * calling the function with EFalse. 
+     */
+    void BlinkResolutionIndicatorOnChange( TBool aBlink=ETrue );
 
   protected: 
 
@@ -577,6 +585,15 @@
     */
     void TouchLayout();
 
+    /**
+     * Callback to blink resolution indicator 
+     */
+    static TInt IndicatorVisible( TAny *aSelf );
+    
+    /**
+     * Draw resolution indicator (for blinking).
+     */
+    void DrawResolutionIndicator();
 
   // =========================================================================
   // Data
@@ -708,6 +725,12 @@
     CCamBatteryPaneController* iBatteryPaneController;
 
     CFbsBitmap* iViewFinderBackup;
+    
+    // For blinking of resolution indicator
+    TBool iBlinkResolutionIndicator;
+    CPeriodic* iIndBlinkTimer;
+    TBool iDrawIndicator;
+    TInt iToggleCountdown;
   // =========================================================================
   };
     
--- a/camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h	Fri Mar 12 15:41:04 2010 +0200
@@ -19,6 +19,9 @@
 #define CAMPRECAPTUREVIEWBASE_H
 
 #include <akntoolbarobserver.h>
+#include <akntouchgesturefw.h>
+#include <akntouchgesturefwobserver.h>
+#include <akntouchgesturefwevents.h>
 
 #include "CamCaptureSetupViewBase.h"
 
@@ -32,6 +35,8 @@
 class TAknsItemID;
 class CAknButton;
 
+
+using namespace AknTouchGestureFw;
 // CLASS DECLARATION
 
 /**
@@ -41,7 +46,8 @@
 */
 class CCamPreCaptureViewBase : 	public CCamCaptureSetupViewBase,
 								public MCamControllerObserver,
-								public MAknToolbarObserver
+								public MAknToolbarObserver,
+								public MAknTouchGestureFwObserver
     {
     public:  // Constructors and destructor
         
@@ -107,7 +113,18 @@
         * @since 2.8
         */
         virtual void ExitAllModesL();
-        
+
+        /**
+         * Gesture events are subscribed once the containers are constructed by 
+         * derived class. 
+         */
+        void CreateContainerL();
+
+        /**
+         * Gesture event notifications are received in this function. 
+         */
+        void HandleTouchGestureL( MAknTouchGestureFwEvent& aEvent );        
+
     public: // New functions
 
        /**
@@ -394,7 +411,10 @@
         TBool iAssumePostCaptureView;
         
         TBool iLocationTrailConnecting;
-		
+        
+        //  Gesture related
+        CAknTouchGestureFw *iGestureFw;
+        TInt iLastMovement;
     };
 
 #endif      // CAMPRECAPTUREVIEWBASE_H 
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camcameracontroller.h	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camcameracontroller.h	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -679,6 +679,11 @@
     // (KIveRecoveryCountMax).
     TInt iIveRecoveryCount;  
     TBool iIveRecoveryOngoing;
+    // ETrue if cancelling command sequence is in progress,
+    // due to lost resources, before recovering.
+    TBool iIveCancel;
+    // ETrue when first recovery command has got callback.  
+    TBool iIveSequenceActive;
     
     CCamAppController& iAppController;
     TInt iCurrentCameraIndex;  
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -3322,6 +3322,7 @@
 CCamAppController::IntSettingChangedL( TCamSettingItemIds aSettingItem, 
                                        TInt               aSettingValue )
   {
+  PRINT( _L("Camera => CCamAppController::IntSettingChangedL") );  
   switch( aSettingItem )
     {
     case ECamSettingItemDynamicSelfTimer:
@@ -3382,6 +3383,7 @@
       break;
       }
     }
+  PRINT( _L("Camera <= CCamAppController::IntSettingChangedL") );
   }
 
 // ---------------------------------------------------------------------------
@@ -4777,7 +4779,9 @@
       {
       iKeyLockStatusWatcher  = CCamPropertyWatcher::NewL( *this,
                                                           KPSUidAvkonDomain,
-                                                          KAknKeyguardStatus );      
+                                                          KAknKeyguardStatus );
+      // request notifications about key lock status
+      iKeyLockStatusWatcher->Subscribe();     
       }
   // read central repository value indicating whether camera shutter sound
   // should be played always or depending on the current profile setting
@@ -5196,27 +5200,11 @@
   TBool continueWithCapture = ETrue;
   CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );  
   
-  // Capture needed as fast as possible.
-  // Use direct stopping of viewfinder
-  // unless there are settings pending,
-  // otherwise cancel capture
-  if ( !IsFlagOn( iBusyFlags, EBusySetting ) )
-      {
-      // Stop VF for burst mode or for secondary or
-      // embedded camera before capturing.
-      // VF stopping will increase capture lag.
-      if ( iInfo.iImageMode == ECamImageCaptureBurst ||
-           iInfo.iActiveCamera == ECamActiveCameraSecondary ||
-           appUi->IsEmbedded() )
-          {
-          StopViewFinder();
-          }
-      }
-  else
+  // Cancel capture if there are settings pending
+  if ( IsFlagOn( iBusyFlags, EBusySetting ) )
       {
       continueWithCapture = EFalse;
       }
-  
 
   switch( iInfo.iImageMode )
     {
@@ -7795,8 +7783,30 @@
           (void)aCategory;
           (void)aKey;
           }
-
-      }
+      }
+      
+      // if its key lock state changed
+      if ( aCategory == KPSUidAvkonDomain && aKey == KAknKeyguardStatus )
+          {
+          PRINT( _L("Camera <> aCategory == KPSUidAvkonDomain && aKey == KAknKeyguardStatus") );
+          if ( !IsKeyLockOn() )
+              {
+              PRINT( _L("Camera <> !IsKeyLockOn()") );
+              // if in standby view and the slide is opened then exit standby view
+              CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+              TVwsViewId activeView;
+              appUi->GetActiveViewId( activeView );
+              CCamPreCaptureViewBase* view = static_cast<CCamPreCaptureViewBase*>( appUi->View( activeView.iViewUid ) );
+              if ( iInfo.iOperation == ECamStandby ||
+                   ( view && view->IsInStandbyMode() ) )
+                  {
+                   PRINT( _L("Camera HandleSlideOpenedL => Exit Standby view") );
+                   view->HandleCommandL( ECamCmdExitStandby );
+                  }
+              }
+          }
+
+
 #endif // !( defined(__WINS__) || defined(__WINSCW__        
 
   PRINT( _L("Camera <= CCamAppController::HandlePropertyChangedL"))
@@ -8674,6 +8684,14 @@
 	    	iLocationTrailTimer->StartTimer();
 			}
 		}
+      else if ( aCloseSession ) 
+        {
+		PRINT( _L("Camera => CCamAppController::StartLocationTrailL - iLocationUtility.Close()") );
+        // location trail already stopped, but we are exiting app, so close the utility
+		iLocationUtility.Close();
+		iLocationUtilityConnected = EFalse;
+		}
+
 	#endif
 	  PRINT( _L("Camera <= CCamAppController::StopLocationTrail") );
 	  }
@@ -8851,23 +8869,23 @@
               NotifyControllerObservers( ECamEventInitReady );
               }
           }
-      
-      if ( UiConfigManagerPtr()->IsLocationSupported() &&
-                   !appUi->IsEmbedded())
-              {
-              if( ECamLocationOn == IntegerSettingValue( ECamSettingItemRecLocation ) )
-                  {
-                  if( ECamActiveCameraPrimary == ActiveCamera() && ECamStandby != CurrentOperation() )
-                      {
-                      StartLocationTrailL();
-                      }
-                  else // Secondary camera 
-                      {
-                      PRINT( _L("Camera: CCamAppController::HandleCameraEventL - secondary camera, stop location trail") )
-                      StopLocationTrail();
-                      }
-                  }
-              }
+
+      if ( UiConfigManagerPtr()->IsLocationSupported() )
+        {
+        if( ECamLocationOn == IntegerSettingValue( ECamSettingItemRecLocation ) )
+            {
+            if( ECamActiveCameraPrimary == ActiveCamera())
+                {
+                StartLocationTrailL();
+                }
+            else // Secondary camera 
+                {
+                PRINT( _L("Camera: CCamAppController::HandleCameraEventL - secondary camera, stop location trail") )
+                StopLocationTrail();
+                }
+            }
+        }
+
       break;
       }
     case ECamCameraEventVfFrameReady:
@@ -8987,8 +9005,20 @@
         {
         PRINT( _L( "Camera => CCamAppController::HandleCameraEventL - Issue new recovery sequence" ) );
         SetStateFromEvent( ECamCameraEventReserveLose );  
-        SetTargetMode( ECamControllerImage );
-        SetTargetImageMode( CurrentImageModeSetup() );
+        CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+        // Find target mode from appUi and set this controller target mode 
+        if( appUi->TargetMode() ==  ECamControllerVideo )
+            {
+            PRINT( _L( "Camera => CCamAppController::HandleCameraEventL - recover to video mode" ) );
+            SetTargetMode( ECamControllerVideo  );
+            SetTargetImageMode( ECamImageCaptureNone );
+            }
+        else
+            {
+            PRINT( _L( "Camera => CCamAppController::HandleCameraEventL - recover to still mode" ) );
+            SetTargetMode( ECamControllerImage );
+            SetTargetImageMode( CurrentImageModeSetup() );
+            }
         IssueModeChangeSequenceL();
         }
       else
@@ -9535,6 +9565,8 @@
       // SetMode( ECamControllerShutdown );
       SetMode( ECamControllerIdle );
       SetOperation( ECamNoOperation );
+      // we dont need location trail anymore.
+      StopLocationTrail();
       break;
     // ---------------------------------
     case ECamCameraEventPowerOn:
@@ -10932,4 +10964,128 @@
     {
     iSettingsModel->StoreUserSceneSettingsL();	    
     }      
+
+// ---------------------------------------------------------------------------
+// HandleVideoQualitySettingChangeL
+// ---------------------------------------------------------------------------
+//
+void 
+CCamAppController::HandleVideoQualitySettingChangeL() 
+  {
+  PRINT( _L("Camera => CCamAppController::HandleVideoQualitySettingChangeL") );
+  if( IsViewFinding() && !Busy() ) 
+    {
+    PRINT( _L("Camera <> CCamAppController - viewfinder on, stop vf / re-prepare / start vf..") );
+    TRAPD( status, 
+      {
+      // Synchronous items
+      // IssueDirectRequestL( ECamRequestVfStop    );
+      // IssueDirectRequestL( ECamRequestSsRelease );
+      // IssueRequestL( ECamRequestVideoInit );
+      // IssueDirectRequestL( ECamRequestSsStart   );
+      // IssueDirectRequestL( ECamRequestVfStart   );
+
+      // Generate the request sequence and issue to Camera Controller.
+      RCamRequestArray sequence;
+      CleanupClosePushL( sequence );
+
+      // Asynchronously init video. No need to reconstruct video names etc.
+      sequence.Append( ECamRequestVfStop );
+      sequence.Append( ECamRequestSsRelease );
+      
+      SetVideoInitNeeded( ETrue );
+
+      sequence.Append( ECamRequestVideoRelease );
+      sequence.Append( ECamRequestVideoInit );
+
+      sequence.Append( ECamRequestSsStart );
+      sequence.Append( ECamRequestVfStart );
+
+      // Set busy flags to indicate sequence in progress and execute the seq 
+      SetFlags( iBusyFlags, EBusySequence );
+      TCleanupItem clearBusy( ClearSequenceBusyFlag, &iBusyFlags );
+      CleanupStack::PushL( clearBusy );
+      iCameraController->RequestSequenceL( sequence );
+      CleanupStack::Pop();
+   
+      iCaptureModeTransitionInProgress = ETrue;
+      CleanupStack::PopAndDestroy(); // sequence.Close()
+      });
+
+    if( KErrNone != status )
+      {
+      PRINT1( _L("Camera <> CCamAppController::HandleVideoQualitySettingChangeL, error:%d"), status );
+      SetOperation( ECamStandby, status );
+      }
+    }
+
+  PRINT( _L("Camera <= CCamAppController::HandleVideoQualitySettingChangeL") );
+  }
+
+// ---------------------------------------------------------------------------
+// CCamAppController::ToggleWideScreenQuality
+// Toggles between wide-screen (16:9) and VGA (4:3) screen resolutions.
+// Applicable only for highest quality settings for 16:9 & 4:3.
+// ---------------------------------------------------------------------------
+//
+TBool CCamAppController::ToggleWideScreenQuality( TBool aWide )
+    {
+    TBool qualityChanged = EFalse;
+    
+    if ( ECamControllerImage == iInfo.iMode && ECamActiveCameraPrimary == iInfo.iActiveCamera )
+        {
+        PRINT( _L("Camera => CCamAppController::ToggleWideScreenQuality - image mode") );
+        TInt qualityIndex = IntegerSettingValue( ECamSettingItemPhotoQuality );
+        if ( qualityIndex <= ECamImageQualityPrintW9m )
+            {
+            TCamPhotoQualitySetting imageQuality = iConfiguration->ImageQuality( qualityIndex );
+            if ( ( imageQuality.iPhotoResolution == EImageResolution12MP &&  aWide ) || 
+                 ( imageQuality.iPhotoResolution == EImageResolutionW9MP && !aWide ) )
+                {
+                qualityIndex = (ECamImageQualityPrintW9m==qualityIndex) ? ECamImageQualityPrint12m 
+                                                                        : ECamImageQualityPrintW9m;
+
+                // Ensure that the setting value is enabled/usable.
+                if ( iSettingsModel->SettingValueEnabled( ECamSettingItemPhotoQuality, qualityIndex ) )
+                    {
+                    SetIntegerSettingValueL( ECamSettingItemPhotoQuality, qualityIndex );
+                    qualityChanged = ETrue;
+                    }
+                }
+            else
+                ; // skip
+            }
+        PRINT( _L("Camera <= CCamAppController::ToggleWideScreenQuality") );
+        }
+    else if ( ECamControllerVideo == iInfo.iMode && ECamActiveCameraPrimary == iInfo.iActiveCamera ) 
+        {
+        PRINT( _L("Camera => CCamAppController::ToggleWideScreenQuality - video mode") );        
+        TInt qualityIndex = IntegerSettingValue( ECamSettingItemVideoQuality );
+        if ( qualityIndex <= ECamVideoQualityNormalHigh )
+            {
+            TVideoQualitySettings videoQuality = iConfiguration->VideoQuality( qualityIndex );
+            qualityIndex = (ECamVideoQualityNormalHigh==qualityIndex) ? ECamVideoQualityHigh
+                                                                      : ECamVideoQualityNormalHigh;
+
+            if ( ( videoQuality.iVideoResolution == ECamVideoResolutionVGA &&  aWide ) || 
+                 ( videoQuality.iVideoResolution == ECamVideoResolutionHD  && !aWide ) )
+                {
+                // Ensure that the setting value is enabled/usable.
+                if ( iSettingsModel->SettingValueEnabled( ECamSettingItemVideoQuality, qualityIndex ) )
+                    {
+                    SetIntegerSettingValueL( ECamSettingItemVideoQuality, qualityIndex );
+                    HandleVideoQualitySettingChangeL();
+                    qualityChanged = ETrue;
+                    }
+                }
+            }
+        PRINT( _L("Camera <= CCamAppController::ToggleWideScreenQuality") );
+        }
+    else // avoids LINT warning.
+        PRINT( _L("Camera =><= CCamAppController::ToggleWideScreenQuality - current quality level NOT high") );
+
+    return qualityChanged;
+    }
+
 //  End of File  
+
--- a/camerauis/cameraapp/generic/src/CamAppui.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppui.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -52,7 +52,7 @@
 #include <oommonitorsession.h>
 #include <driveinfo.h>
 #include <pathinfo.h>
-#include <accmonitor.h>
+#include <AccMonitor.h>
 
 #ifndef __WINSCW__
 //#include <SFIUtilsAppInterface.h>
@@ -380,49 +380,51 @@
       CamUtility::GetPsiInt( ECamPsiPrimaryCameraOrientation, orientation );
       }
 
-  // Finish engine construction    
-  if( uiOrientationOverride )
-    {
-    iController.CompleteConstructionL();
-    }
-
   if ( orientation == ( TInt ) EAppUiOrientationLandscape )
     {
     PRINT( _L("Camera <> orientation is landscape ") )
     iCamOrientation = (ECamHandLeft == iSoftkeyPosition ) 
                     ? ECamOrientationCamcorderLeft 
                     : ECamOrientationCamcorder;
-    if( uiOrientationOverride )
-      {
-      //set orientation to CCamera	
-      iController.SetCameraOrientationModeL( iLandscapeScreenMode );
-      // and complete the cameracontroller construction
-      iController.CompleteCameraConstructionL();
-      }
+
     PRINT( _L("Camera <> Calling BaseConstructL") )
     OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" ); //CCORAPP_APP_BASE_CONSTRUCT_START
     BaseConstructL( EAppOrientationLandscape | EAknEnableSkin | EAknEnableMSK | 
                     ENonStandardResourceFile | EAknSingleClickCompatible );
     OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" );    //CCORAPP_APP_BASE_CONSTRUCT_END
     PRINT( _L("Camera <> BaseConstructL Complete") )
+                            
+    if( uiOrientationOverride )
+      {
+      // Finish engine construction
+      iController.CompleteConstructionL();  
+      //set orientation to CCamera	
+      iController.SetCameraOrientationModeL( iLandscapeScreenMode );
+      // and complete the cameracontroller construction
+      iController.CompleteCameraConstructionL();
+      }
     }
   else
     {
     PRINT( _L("Camera <> orientation is portrait") )
     iCamOrientation = ECamOrientationPortrait;
-    if( uiOrientationOverride )
-      {
-      //set orientation to CCamera	
-      iController.SetCameraOrientationModeL( iPortraitScreenMode );
-      // and complete the cameracontroller construction
-      iController.CompleteCameraConstructionL();
-      }     
+    
     PRINT( _L("Camera <> Calling BaseConstructL") )
     OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 1" );
     BaseConstructL( EAppOrientationPortrait | EAknEnableSkin | EAknEnableMSK | 
                     ENonStandardResourceFile );  
     OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMAPPUI_CONSTRUCTL, "e_CAM_APP_BASE_CONSTRUCT 0" );
     PRINT( _L("Camera <> BaseConstructL Complete") )
+    
+    if( uiOrientationOverride )
+      {
+      // Finish engine construction
+      iController.CompleteConstructionL();  
+      //set orientation to CCamera	
+      iController.SetCameraOrientationModeL( iPortraitScreenMode );
+      // and complete the cameracontroller construction
+      iController.CompleteCameraConstructionL();
+      }     
     }
 
     PERF_EVENT_END_L2( EPerfEventAvkonUIConstruction );
@@ -2385,7 +2387,20 @@
                 SetPreCaptureMode( ECamPreCapViewfinder ); 
                 }
             iFirstBoot = EFalse;
-            iView->HandleCommandL( ECamCmdPopUpMenuZoom );
+            // Do not show zoom pane when toolbar extension is visible
+            if ( iController.IsTouchScreenSupported() )
+                {
+                CAknToolbar* toolbar = CurrentFixedToolbar();
+                if ( toolbar )
+                    {
+                    CAknToolbarExtension* toolbarextension =
+                    toolbar->ToolbarExtension();
+                    if ( toolbarextension && !toolbarextension->IsShown() )
+                        {
+                        iView->HandleCommandL( ECamCmdPopUpMenuZoom );
+                        }
+                    }
+                }
             }
         //Remaining recording time counter update needed when recording has stopped and
         //show last captured video setting is off.
@@ -2539,21 +2554,6 @@
                     }
                 }
             }
- 
-      if ( iController.UiConfigManagerPtr() && iController.UiConfigManagerPtr()->IsLocationSupported() )
-          {
-          // If record location setting is on, stop location trail
-          if ( ECamViewStatePreCapture != iViewState && ECamLocationOn == iController.IntegerSettingValue( ECamSettingItemRecLocation ) )
-          	  {
-          	  PRINT( _L("Camera: Gallery notified and non pre-capture view, stop location trail") )
-          	  iController.StopLocationTrail();
-          	  }
-          else
-          	  {
-              PRINT1( _L("Camera: location trail not in use or view state (%d) is precapture"), iViewState )
-          	  }
-          }
-
         break;
         }
     // -----------------------------------------------------
@@ -3352,17 +3352,6 @@
           // Shut down the Sensor API object.
           iController.UpdateSensorApiL(EFalse);
 
-          if ( iController.UiConfigManagerPtr() && 
-               iController.UiConfigManagerPtr()->IsLocationSupported() )
-              {
-        	  // If record location setting is on, stop location trail when losing focus
-        	  if ( AppInBackground( EFalse ) )
-        	      {
-        	      PRINT( _L("Camera: CCamAppUi::HandleWsEventL focus lost, stop location trail") )
-        	      iController.StopLocationTrail();
-        	      }
-              }
-
     #if !defined (__WINSCW__)
           // relinquish capture keys
           UnRegisterCaptureKeys();    
@@ -8145,7 +8134,10 @@
             // view is active.
             if ( iMode == iTargetMode &&
                 ( ( iMode == ECamControllerVideo && iView == iVideoCaptureView ) ||
-                  ( iMode == ECamControllerImage && iView == iStillCaptureView ) ) )
+                  ( iMode == ECamControllerImage && iView == iStillCaptureView ) ) &&
+                ( iPreCaptureMode != ECamPreCapCaptureSetup ) && 
+                ( iPreCaptureMode != ECamPreCapGenericSetting ) && 
+                ( iPreCaptureMode != ECamPreCapSceneSetting ) )
                 {
                 fixedToolbar->SetToolbarVisibility( ETrue );
                 }
--- a/camerauis/cameraapp/generic/src/CamImageSaveActive.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamImageSaveActive.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -449,16 +449,8 @@
 #ifdef RD_MDS_2_5   
         if ( iController.UiConfigManagerPtr() && iController.UiConfigManagerPtr()->IsLocationSupported() )
             {
-            TBool location ;
+            TBool location = iController.IntegerSettingValue( ECamSettingItemRecLocation );
 			//Never save location information in second camera
-			if(iController.ActiveCamera() == ECamActiveCameraSecondary)
-				  {
-				  location = EFalse;
-				  }
-			else
-				  {
-				  location = iController.IntegerSettingValue( ECamSettingItemRecLocation );
-				  }
             iHarvesterClient.HarvestFile( aFilename,
                                           harvestAlbumIds,
                                           location );
--- a/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -68,6 +68,10 @@
 const TInt KReticuleFlashTimeout = 250000;  // Quarter of a second (in microseconds).
 const TInt KAFIconCorners = 4; // Hip to be square 
 
+const TInt KIndicatorBlinkDelay = 250 * 1000;
+const TInt KNumberOfBlinks = 3;
+const TInt KNumberOfBlinksVideo = 8;
+
 #include "camvfgridinterface.h"
 #include "camlinevfgriddrawer.h"
 
@@ -781,6 +785,60 @@
                 }
             }
         }
+    // ---------------------------------------------------        
+    case ECamEventImageQualityChanged:
+    case ECamEventVideoQualityChanged:
+        if ( iBlinkResolutionIndicator ) 
+            {
+            // Force the first blink to occur right away 
+            iDrawIndicator = EFalse;
+            DrawResolutionIndicator();
+
+            // Update the resolution indicator icon to be used.
+            SetResolutionIndicator();
+
+            // Start the blinking timer
+            if ( !iIndBlinkTimer )
+                {
+                iIndBlinkTimer = CPeriodic::NewL( EPriorityLess );
+                }
+            else 
+                {
+                iIndBlinkTimer->Cancel();
+                }
+
+            iToggleCountdown = 2 * KNumberOfBlinks;
+            if ( ECamEventVideoQualityChanged == aEvent )
+                {
+                iToggleCountdown = 2 * KNumberOfBlinksVideo;
+                }
+            PRINT( _L("Camera <> start timer to blink indicator") );
+            iIndBlinkTimer->Start( KIndicatorBlinkDelay,
+                                   KIndicatorBlinkDelay,
+                                   TCallBack( IndicatorVisible, this) );
+
+            // Force the first blink to occur right away 
+            iDrawIndicator = ETrue;
+            DrawResolutionIndicator();
+
+            // Quality level has changed through pinch gesture
+            // Reinitialise the viewfinder grid 
+            if ( iVfGridDrawer )
+                {
+                delete iVfGridDrawer;
+                iVfGridDrawer = NULL;
+            
+                TRect rect = ViewFinderFrameRect();
+                InitVfGridL( rect );
+                }
+            }
+        else
+            {
+            if ( iIndBlinkTimer )
+                iIndBlinkTimer->Cancel();
+            }
+        break; 
+    // ---------------------------------------------------
     default:
       {
       // Other events => no action.
@@ -827,6 +885,11 @@
         }
     else    
         {
+        if ( iIndBlinkTimer )
+            {
+            iIndBlinkTimer->Cancel();
+            iDrawIndicator = ETrue;
+            }
         iReceivedVfFrame = EFalse;
 
         // Cancel timer if we're losing focus
@@ -887,6 +950,13 @@
       {
       if( iBatteryPaneController )
         iBatteryPaneController->Pause( ETrue );
+      
+	  if ( iIndBlinkTimer )
+          {
+          iIndBlinkTimer->Cancel();
+          iDrawIndicator = ETrue;
+          }
+		  
       break;
       }
     default:
@@ -2564,5 +2634,67 @@
     return resolutionIconLayout.Rect();
     }
 
+void CCamPreCaptureContainerBase::BlinkResolutionIndicatorOnChange( TBool aBlink )
+    {
+    iBlinkResolutionIndicator = aBlink;
+    }
+
+void CCamPreCaptureContainerBase::DrawResolutionIndicator()
+    {
+    PRINT( _L("Camera => CCamPreCaptureContainerBase::DrawResolutionIndicator") );
+    iToggleCountdown--;
+
+    // State changed, need to redraw
+    ActivateGc();
+
+    // Invalidate the flash icon area
+    TRect rect( iResolutionIndicators[iCurrentIndicator]->LayoutRect() );
+    RWindow window = Window();
+    window.Invalidate( rect  );
+    window.BeginRedraw( rect );
+
+    // Redraw the background in that area
+    Redraw( rect );
+
+    // Draw the flash icon itself
+    CWindowGc& gc = SystemGc();
+    if( iDrawIndicator )
+        {
+        iResolutionIndicators[iCurrentIndicator]->DisplayIcon();
+        }
+    else
+        {
+        iResolutionIndicators[iCurrentIndicator]->ClearIcon();
+        }
+    iResolutionIndicators[iCurrentIndicator]->Draw( gc );
+
+    // Tell the window redraw is finished and deactivate Gc
+    window.EndRedraw();
+    DeactivateGc();
+
+    // Stop the periodic timer when enough blinking has been done
+    if ( iDrawIndicator && iToggleCountdown <= 0 )
+        {
+        iBlinkResolutionIndicator = EFalse;
+        iIndBlinkTimer->Cancel();
+        }
+
+    PRINT( _L("Camera <= CCamPreCaptureContainerBase::DrawResolutionIndicator") );
+    }
+
+TInt CCamPreCaptureContainerBase::IndicatorVisible( TAny *aSelf )
+    {
+    PRINT( _L("Camera => CCamPreCaptureContainerBase::IndicatorVisible") );
+    CCamPreCaptureContainerBase* self = static_cast<CCamPreCaptureContainerBase*> (aSelf);
+
+    if ( self )
+        {
+        self->iDrawIndicator = !self->iDrawIndicator;
+        self->DrawResolutionIndicator();
+        }
+    PRINT( _L("Camera <= CCamPreCaptureContainerBase::IndicatorVisible") );
+    return KErrNone;
+    }
+
 // End of File  
 
--- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -75,7 +75,8 @@
 void CCamPreCaptureViewBase::HandleCommandL( TInt aCommand )
     {
     PRINT( _L("Camera => CCamPreCaptureViewBase::HandleCommandL") );
-                  
+
+    iLastMovement = 0;
     switch ( aCommand )
         {              
         case ECamCmdShootSetup:
@@ -258,6 +259,7 @@
   {
   PRINT1( _L( "Camera => CCamPreCaptureViewBase::HandleForegroundEventL %d" ), aForeground );    
 
+  iLastMovement = 0;
   CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );                
   __ASSERT_DEBUG(appUi, CamPanic(ECamPanicNullPointer));
 
@@ -589,6 +591,7 @@
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMPRECAPTUREVIEWBASE_DOACTIVATEL, "e_CCamPreCaptureViewBase_DoActivateL 1" );
     PRINT( _L( "Camera => CCamPreCaptureViewBase::DoActivateL" ) );
     iAssumePostCaptureView = EFalse;
+    iLastMovement = 0;
 
     ShowToolbarOnViewActivation( EFalse );
     /*if ( iController.UiConfigManagerPtr() && 
@@ -1368,19 +1371,6 @@
         {    
         appUi->RaisePreCaptureCourtesyUI(ETrue);
         }
-    
-    if ( iController.UiConfigManagerPtr() && 
-                iController.UiConfigManagerPtr()->IsLocationSupported() )
-	   {
-	   if( ECamLocationOn == iController.IntegerSettingValue( ECamSettingItemRecLocation ) )
-		   {
-		   if( ECamActiveCameraPrimary == iController.ActiveCamera() )
-			   {
-			   PRINT( _L("Camera: CCamPreCaptureViewBase::ExitStandbyModeL - primary camera, start location/gps") )
-			   iController.StartLocationTrailL();
-			   }
-		   }
-	   }
     PRINT( _L("Camera <= CCamPreCaptureViewBase::ExitStandbyModeL" ) )
     }
 
@@ -1596,6 +1586,8 @@
 CCamPreCaptureViewBase::HandleAppEvent( const TCamAppEvent& aEvent )
     {
     PRINT1( _L("Camera => CCamPreCaptureViewBase::HandleAppEvent, event:%d"), aEvent );
+    // Reset last pinch movement direction
+    iLastMovement = 0;
     CCamViewBase::HandleAppEvent( aEvent );
 
     if ( aEvent == ECamAppEventFocusGained && iController.InVideocallOrRinging() )
@@ -1757,4 +1749,67 @@
 	{
 	CEikonEnv::Static()->WsSession().ClearAllRedrawStores();
 	}
+
+// ---------------------------------------------------------------------------
+// CCamPreCaptureViewBase::CreateContainerL
+//
+// ---------------------------------------------------------------------------
+//
+void CCamPreCaptureViewBase::CreateContainerL()
+    {
+    PRINT( _L("Camera => CCamPreCaptureViewBase::CreateContainerL") );
+
+    // Create gesture fw object, set observer and gesture interest
+    iGestureFw = CAknTouchGestureFw::NewL( *this, *iContainer );
+    iGestureFw->SetGestureInterestL( EAknTouchGestureFwGroupPinch );
+
+    PRINT( _L("Camera <= CCamPreCaptureViewBase::CreateContainerL") );            
+    }
+
+// ---------------------------------------------------------------------------
+// CCamPreCaptureViewBase::HandleTouchGestureL
+//
+// ---------------------------------------------------------------------------
+//
+void CCamPreCaptureViewBase::HandleTouchGestureL( MAknTouchGestureFwEvent& aEvent )
+    {
+    PRINT( _L("Camera => CCamPreCaptureViewBase::HandleTouchGestureL") );
+    
+    // Skipped modes here
+    if ( iController.ActiveCamera() == ECamActiveCameraSecondary )
+        {
+        PRINT( _L("Camera <= CCamPreCaptureViewBase::HandleTouchGestureL") );
+        return;
+        }
+
+    MAknTouchGestureFwPinchEvent *pinch = AknTouchGestureFwEventPinch( aEvent );
+    if ( pinch )
+        {
+        // Determine the direction of pinch: +ve -> pinch outward / zoom / widen VF
+        TInt currMove = pinch->Movement();
+        TBool wide = (currMove > 0) ? ETrue : EFalse;  
+        PRINT1( _L("Camera <> CCamPreCaptureViewBase::HandleTouchGestureL - pinch, movement:%d"), currMove );
+
+        if ( ( iLastMovement >= 0 && currMove < 0 ) || 
+             ( iLastMovement <= 0 && currMove > 0 ) )
+            {
+            // Enable the blinking for resolution indicators and toggle image/video quality
+            // level between top widescreen and vga levels
+            CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
+            container->BlinkResolutionIndicatorOnChange( ETrue );
+            if ( iController.ToggleWideScreenQuality( wide ) )
+                {
+                iLastMovement = currMove;
+                }
+            else
+                {
+                // if the quality level wasn't changed, then disable the blinking
+                container->BlinkResolutionIndicatorOnChange( EFalse );
+                }
+            }
+        }
+
+    PRINT( _L("Camera <= CCamPreCaptureViewBase::HandleTouchGestureL") );
+    }
+
 //  End of File  
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -909,6 +909,8 @@
         *this,
         screen );
     iContainer->SetMopParent( this );
+    
+    CCamPreCaptureViewBase::CreateContainerL();
     PRINT( _L("Camera <= CCamStillPreCaptureView::CreateContainerL" ) )
     }
 
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -225,12 +225,13 @@
         break;
         }
       // ---------------------------------------------------
-//      case ECamEventImageQualityChanged:
-//	    {
-//	    // To get correct viewfinder resolution:
-//		TCamVideoResolution res = iController.GetCurrentVideoResolution();
-//		iVFRes = iController.VideoViewFinderResourceId( res );
-//		}
+      case ECamEventVideoQualityChanged:
+	    {
+	    // To get correct viewfinder resolution:
+		// TCamVideoResolution res = iController.GetCurrentVideoResolution();
+		// iVFRes = iController.VideoViewFinderResourceId( res );
+	    SetResolutionIndicator();
+		}
       // ---------------------------------------------------
       case ECamEventRecordComplete:    
         {
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -860,6 +860,8 @@
 //
 void CCamVideoPreCaptureView::CreateContainerL()
     {
+    PRINT( _L("Camera => CCamVideoPreCaptureView::CreateContainerL" ) )
+
     TRect screen;
     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen );
 
@@ -869,6 +871,9 @@
         screen );
 
     iContainer->SetMopParent( this );
+
+    CCamPreCaptureViewBase::CreateContainerL();
+    PRINT( _L("Camera <= CCamVideoPreCaptureView::CreateContainerL" ) )
     }
 
 // ---------------------------------------------------------------------------
--- a/camerauis/cameraapp/generic/src/CamViewBase.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamViewBase.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -387,8 +387,9 @@
     	{
     	BlankSoftkeysL();
     	}
-    else if ( appUi->StandbyStatus() == KErrInUse 
-	 ||  appUi->StandbyStatus() == KErrPermissionDenied )
+    else if ( appUi->StandbyStatus() == KErrInUse ||
+              appUi->StandbyStatus() == KErrPermissionDenied ||
+              appUi->StandbyStatus() == KErrAccessDenied )
         {
         SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );	
         }	
--- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Fri Mar 12 15:41:04 2010 +0200
@@ -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"
@@ -856,6 +856,15 @@
   HandleVideoEvent( ECamCameraEventVideoInit, aError );
   // DelayCallback( ECamCameraEventVideoInit, aError, 500000 );
 #else 
+  if( aError &&
+      ( iIveCancel || ( !iIveSequenceActive && iIveRecoveryOngoing ) ) )
+      // Return if error and recovering process has been started, 
+      // but this video prepare complete is not part of recovery 
+      // i.e. iIveSequenceActive is not active yet. 
+    {
+    PRINT1( _L("Camera => CCamCameraController::McaeoVideoPrepareComplete - Ignore err %d"), aError );
+    return; 
+    }
   HandleVideoEvent( ECamCameraEventVideoInit, aError );  
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
 
@@ -3896,6 +3905,7 @@
   PRINT1( _L("Camera => CCamCameraController::EndSequence, status:%d"), aStatus );
 
   iIveRecoveryOngoing = EFalse;
+  iIveSequenceActive = EFalse;
 #ifdef CAMERAAPP_CAE_FIX
   if( ECamModeChangeInactive != iModeChange )
     {
@@ -4099,6 +4109,11 @@
     PRINT( _L("Camera => CCamCameraController::HandleReserveGainEvent - return, recovery in progress"));
     return;
     }
+  if( iIveRecoveryOngoing && !iIveSequenceActive )
+    {
+    PRINT( _L("Camera => CCamCameraController::HandleReserveGainEvent - first recovering sequence command executed"));
+    iIveSequenceActive = ETrue;
+    }
   // We should be blocking new request at the moment.
   __ASSERT_DEBUG( iInfo.iBusy, Panic( ECamCameraControllerCorrupt ) );
   CAMERAAPP_PERF_CONTROLLER_STOP( ECamRequestReserve );
@@ -6606,6 +6621,7 @@
         else
             {
             PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Start recovering from beginning") )  
+            iIveSequenceActive = EFalse;
             if( IsFlagOn( iInfo.iBusy, ECamBusySequence|ECamBusySetting ) )
                 {
                 if( iActive &&
@@ -6613,13 +6629,15 @@
                     {
                     iActive->Cancel();
                     }
-                EndSequence( KErrNone );  
+                iIveCancel = ETrue;
+                EndSequence( KErrNone ); // Clears iIveRecoveryOngoing and iIveSequenceActive
                 }  
             NotifyObservers( KErrNone, ECamCameraEventIveRecover, 
                              ECamCameraEventClassBasicControl );
             }
         iIveRecoveryCount--;
         iIveRecoveryOngoing = ETrue;
+        iIveCancel = EFalse;
         }
     PRINT1( _L("Camera <= CCamCameraController::DoIveRecovery iIveRecoveryCount%d"),iIveRecoveryCount )  
     }
@@ -6630,7 +6648,10 @@
 //
 TBool CCamCameraController::IsWaitingIveResources()
     {
-    return iIdle && iIdle->IsActive();
+    // ETrue if recovery is started, but not completed.
+    // iIveRecoveryOngoing is set to false when last recovery command is executed
+    return (iIdle && iIdle->IsActive()) || 
+            iIveCancel || iIveRecoveryOngoing || iIveSequenceActive;
     }
 
 
--- a/camerauis/cameraapp/loc/cam.loc	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/loc/cam.loc	Fri Mar 12 15:41:04 2010 +0200
@@ -4201,8 +4201,8 @@
 //d:Popup info note for camera first-time-use
 //d:This is shown as a warning to the user 
 //d:for the default value of location setting.
-//l:popup_info_list_pane_t1
-#define qtn_lcam_descr_location_ftu "Location recording can be disabled in camera settings."
+//l:none
+#define qtn_lcam_location_ftu "Location recording can be disabled in camera settings."
 
 //d:Set as default scene mode setting title
 //d:Shown in user scene setting list
@@ -4219,5 +4219,27 @@
 //l: list_single_pane_t1
 #define qtn_lcam_set_user_default_no "No"
 
+//d: Tooltip text for Image editor button
+//d: in touch toolbar in camera post-capture view
+//l: main_cam5_pane_t11
+#define qtn_lcam_tt_image_editor "Image editor"
+
+
+//d: Tooltip text for Video editor button
+//d: in touch toolbar in camcorder post-capture view
+//l: main_cam5_pane_t11
+#define qtn_lcam_tt_video_editor "Video editor"
+
+//d: If Geotagging is enabled by default in the Camera application, 
+//d: a location tagging dialog is shown to the user. 
+//d: It is displayed only when Camera is initiated for the first time.
+//l: none
+#define qtn_lcam_location_ftu_text "Captured photos and videos will be tagged with your location. If photos or videos are shared, the location data may also be visible to third parties. Phone will use network to get the location data. Data transfer charges may apply."
+
+//d: When a device has no mass memory and memory card is not 
+//d: inserted when opening the camera, the user will get a note
+//l: popup_note_window
+#define qtn_lcam_insert_mmc_note "Please insert memory card in order to capture photos and videos"
 
 // end of file
+
--- a/camerauis/cameraapp/traces/OstTraceDefinitions.h	Fri Feb 19 22:36:31 2010 +0200
+++ b/camerauis/cameraapp/traces/OstTraceDefinitions.h	Fri Mar 12 15:41:04 2010 +0200
@@ -3,5 +3,5 @@
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
 // REMOVE BEFORE CHECK-IN TO VERSION CONTROL
 //#define OST_TRACE_COMPILER_IN_USE
-#include <OpenSystemTrace.h>
+#include <opensystemtrace.h>
 #endif