Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:19:06 +0300
branchRCL_3
changeset 20 38fb6f7eacd5
parent 18 51dda465e618
child 25 bf64cebf4673
Revision: 201015 Kit: 201017
camerauis/cameraapp/build/cameraapp.inf
camerauis/cameraapp/build/cameraapp.mmp
camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp
camerauis/cameraapp/generic/common/data/CamSettings.ra
camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra
camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra
camerauis/cameraapp/generic/common/inc/Cam.hrh
camerauis/cameraapp/generic/common/inc/CamUtility.h
camerauis/cameraapp/generic/common/src/CamUtility.cpp
camerauis/cameraapp/generic/data/cameraappSelfTimer.wav
camerauis/cameraapp/generic/data/nhdcamsettings.rss
camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra
camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra
camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra
camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra
camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra
camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra
camerauis/cameraapp/generic/data/vgacamsettings.rss
camerauis/cameraapp/generic/inc/CamAppController.h
camerauis/cameraapp/generic/inc/CamAppUi.h
camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h
camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h
camerauis/cameraapp/generic/inc/CamSoundPlayer.h
camerauis/cameraapp/generic/inc/CamStandbyContainer.h
camerauis/cameraapp/generic/inc/CamUserSceneSetupViewBase.h
camerauis/cameraapp/generic/inc/CamViewBase.h
camerauis/cameraapp/generic/inc/audioplayer/camaudioplayercontroller.h
camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h
camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h
camerauis/cameraapp/generic/inc/camoneclickuploadutility.h
camerauis/cameraapp/generic/inc/camvideotime.h
camerauis/cameraapp/generic/src/CamAppController.cpp
camerauis/cameraapp/generic/src/CamAppui.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp
camerauis/cameraapp/generic/src/CamDriveChangeNotifier.cpp
camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp
camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamPropertyWatcher.cpp
camerauis/cameraapp/generic/src/CamSelfTimer.cpp
camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp
camerauis/cameraapp/generic/src/CamSoundPlayer.cpp
camerauis/cameraapp/generic/src/CamStandbyContainer.cpp
camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp
camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp
camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp
camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamViewBase.cpp
camerauis/cameraapp/generic/src/audioplayer/camaudioplayercontroller.cpp
camerauis/cameraapp/generic/src/audioplayer/camaudioplayerwrapper.cpp
camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp
camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp
camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp
camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp
camerauis/cameraapp/generic/src/camvideotime.cpp
camerauis/cameraapp/rom/cameraapp.iby
--- a/camerauis/cameraapp/build/cameraapp.inf	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/build/cameraapp.inf	Tue Apr 27 16:19:06 2010 +0300
@@ -50,6 +50,8 @@
 ../generic/data/cameraappStart.wav    /epoc32/release/armv5/udeb/z/system/sounds/digital/cameraappStart.wav
 ../generic/data/cameraappStop.wav    /epoc32/release/armv5/urel/z/system/sounds/digital/cameraappStop.wav
 ../generic/data/cameraappStop.wav     /epoc32/release/armv5/udeb/z/system/sounds/digital/cameraappStop.wav
+../generic/data/cameraappSelfTimer.wav   /epoc32/release/armv5/urel/z/system/sounds/digital/cameraappSelfTimer.wav
+../generic/data/cameraappSelfTimer.wav   /epoc32/release/armv5/udeb/z/system/sounds/digital/cameraappSelfTimer.wav
 
 
 ../generic/data/cameraappCaptureShort1.wav /epoc32/release/winscw/urel/z/system/sounds/digital/cameraappCaptureShort1.wav
--- a/camerauis/cameraapp/build/cameraapp.mmp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/build/cameraapp.mmp	Tue Apr 27 16:19:06 2010 +0300
@@ -223,7 +223,6 @@
 SOURCEPATH      ../generic/src/audioplayer
 SOURCE camaudioplayercontroller.cpp
 SOURCE camaudioplayerwrapper.cpp
-SOURCE camtoneplayerwrapper.cpp
 
 // Test code sources
 SOURCEPATH        ../generic/dummyengine
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/inc/GSCamQualitySettingContainer.h	Tue Apr 27 16:19:06 2010 +0300
@@ -284,7 +284,7 @@
         CGSCamQualitySettingSlider* iSlider;
         // The current capture mode (video/still)
         TCamCameraMode iMode;
-
+        
         // Array of supported qualities
         RArray<TInt> iSupportedQualitiesArray;
         
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamPhotoSettingsList.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -259,7 +259,7 @@
                 {
                 iDefaultNameBase = parent->TextSettingValue(
                                    ECamSettingItemPhotoNameBase );
-                TBool flag = ( iLaunchedFromGS || iSecondaryCameraSettings );
+                TBool flag = ( iLaunchedFromGS );
                 settingItem = 
                     new( ELeave ) CGSCamDefaultNameSettingItem( iDefaultNameBase, 
                                                                 ECamControllerImage,
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsList.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -258,7 +258,7 @@
                 iDefaultNameBase = parent->TextSettingValue( 
                                             ECamSettingItemVideoNameBase );
                 }
-            TBool flag = ( iLaunchedFromGS || iSecondaryCameraSettings );
+            TBool flag = ( iLaunchedFromGS );
             settingItem = new( ELeave ) 
                           CGSCamDefaultNameSettingItem( iDefaultNameBase, 
                                                         ECamControllerVideo, 
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamdefaultnamesettingpage.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -87,12 +87,12 @@
             // Show the editor dialog                
             TBool editorRet = EFalse;  
             // Trap this to make sure the orientation is reverted back to normal   
-            if ( Cba() )
+            if ( Cba() && !iCamera )
               {
               Cba()->MakeVisible( EFalse );
               }
             TRAPD( leaveErr, editorRet = ShowEditorDialogL() )
-            if ( Cba() )
+            if ( Cba() && !iCamera )
               {              
               Cba()->MakeVisible( ETrue );                          
               }
--- a/camerauis/cameraapp/generic/common/data/CamSettings.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/data/CamSettings.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -1076,7 +1076,7 @@
 	// The custom quality control is used instead
 	type = EAknCtPopupSettingList;
 	editor_resource_id = r_cam_setting_listbox;
-	softkey_resource = R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT;
+	softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
 	}
 
 //----------------------------------------------------
--- a/camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/data/CamStillCaptureCamcorder.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -918,7 +918,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/data/CamVideoCaptureCamcorder.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -963,7 +963,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/common/inc/Cam.hrh	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/inc/Cam.hrh	Tue Apr 27 16:19:06 2010 +0300
@@ -166,6 +166,7 @@
   ECamCmdEditVideo,
   ECamCmdPrint,
   ECamCmdShareOnOvi,
+  ECamCmdShareSettings,  
   ECamMSKCmdAppChange,
   ECamMSKCmdAppCapture,
   ECamMSKCmdAppRecord,
@@ -220,7 +221,6 @@
     ECamVideoStopSoundId,
     ECamVideoPauseSoundId,
     ECamVideoResumeSoundId,
-    ECamInCallToneId,
     ECamStillCaptureSoundId1,
     ECamStillCaptureSoundId2,
     ECamStillCaptureSoundId3,
@@ -337,6 +337,17 @@
     ECameraCompleteExit
     };
 
+/** 
+ * Cameraui error codes
+ */
+
+enum TCamErrorCode
+    {
+    ECamMinErrCode = -16384,
+    ECamErrMassStorageMode,
+    ECamErrMemoryCardNotInserted
+    };
+
 #endif // CAM_HRH
 
 // End of File
--- a/camerauis/cameraapp/generic/common/inc/CamUtility.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/inc/CamUtility.h	Tue Apr 27 16:19:06 2010 +0300
@@ -89,6 +89,7 @@
 _LIT( KCamVideoPauseTone,    "z:\\system\\sounds\\digital\\cameraappStop.wav"      );
 _LIT( KCamVideoStopTone,     "z:\\system\\sounds\\digital\\cameraappStop.wav"      );
 _LIT( KCamAutoFocusComplete, "z:\\system\\sounds\\digital\\cameraappFocusSucc.wav" );
+_LIT( KCamSelfTimerTone, "z:\\system\\sounds\\digital\\cameraappSelfTimer.wav" );
 
 #endif //CAMERAAPP_PLUGIN_BUILD
 
--- a/camerauis/cameraapp/generic/common/src/CamUtility.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/common/src/CamUtility.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -1103,8 +1103,8 @@
 
       // First period is at 2-seconds remaining, "always on"
       timerPeriod1.iThreshold  [0] = 2*KMicroSecPerSec;
-      timerPeriod1.iFlashPeriod[0] = KMaxTInt;
-      timerPeriod1.iBeepPeriod [0] = KMaxTInt;
+      timerPeriod1.iFlashPeriod[0] = KMicSecInQuartSec;// KMaxTInt;
+      timerPeriod1.iBeepPeriod [0] = KMicSecInHalfSec;// KMaxTInt;
 
       // There are no other periods
 
@@ -1125,12 +1125,12 @@
       timerPeriod2.iBeepPeriod [0] = KMicroSecPerSec;       // Beep every second
 
       // Second period starts at 3-seconds until capture, flashing twice every second
-      timerPeriod2.iThreshold  [1] = 5*KMicroSecPerSec;
+      timerPeriod2.iThreshold  [1] = 2*KMicroSecPerSec;
       timerPeriod2.iFlashPeriod[1] = KMicSecInQuartSec;  // 250ms on/250ms off
       timerPeriod2.iBeepPeriod [1] = KMicSecInHalfSec;   // Beep twice every second
 
       // Third period is not supported
-      timerPeriod2.iThreshold  [2] = 3*KMicroSecPerSec;
+      timerPeriod2.iThreshold  [2] = 0*KMicroSecPerSec;
       timerPeriod2.iFlashPeriod[2] = KMaxTInt;
       timerPeriod2.iBeepPeriod [2] = KMaxTInt;
 
@@ -1151,12 +1151,12 @@
       timerPeriod3.iBeepPeriod [0] = KMicroSecPerSec;       // Beep every second
 
       // Second period starts at 3-seconds until capture, flashing twice every second
-      timerPeriod3.iThreshold  [1] = 5*KMicroSecPerSec;
+      timerPeriod3.iThreshold  [1] = 2*KMicroSecPerSec;
       timerPeriod3.iFlashPeriod[1] = KMicSecInQuartSec;  // 250ms on/250ms off
       timerPeriod3.iBeepPeriod [1] = KMicSecInHalfSec;   // Beep twice every second
 
       // Third period is not supported
-      timerPeriod3.iThreshold  [2] = 3*KMicroSecPerSec;
+      timerPeriod3.iThreshold  [2] = 0*KMicroSecPerSec;
       timerPeriod3.iFlashPeriod[2] = KMaxTInt;
       timerPeriod3.iBeepPeriod [2] = KMaxTInt;
 
Binary file camerauis/cameraapp/generic/data/cameraappSelfTimer.wav has changed
--- a/camerauis/cameraapp/generic/data/nhdcamsettings.rss	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/nhdcamsettings.rss	Tue Apr 27 16:19:06 2010 +0300
@@ -855,16 +855,6 @@
             preference = EAknAudioPrefCamera;
             file = KCamAutoFocusSuccFile;
             volume = 5;
-            },
-        // Self-timer beep
-        AVKON_SOUND_INFO 
-            { 
-            sid = ECamSelfTimerSoundId; 
-            priority = EAvkonAlarmTonesPriority;
-            preference = EAknAudioPrefDefaultTone; 
-            sequencelength = 6;
-            sequence = { 0, 17, 6, 118, 10, 11 };
-            volume = 9; 
             }
          
         };
@@ -3374,10 +3364,12 @@
         {
         AIW_CRITERIA_ITEM // SHARE_AIW
             {
-            id = KAiwCmdView;
-            serviceCmd = KAiwCmdView;
-            contentType = "*";
+            id              = ECamCmdShareSettings;
+            serviceCmd      = KAiwCmdView;
+            contentType     = "*";
+            defaultProvider = 0x2002CC1F; //KShareAppUidVal;	    
             serviceClass = KAiwClassMenu;
+            maxProviders    = 1;
             }
         };
     }
--- a/camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamBurstCapture.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -917,7 +917,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamBurstCaptureV2.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -917,7 +917,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamStillCapturePortrait.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -377,7 +377,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamStillCaptureViewMode.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -240,7 +240,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamVideoCapturePortrait.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -614,7 +614,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/resource_inc/CamVideoCaptureViewMode.ra	Tue Apr 27 16:19:06 2010 +0300
@@ -569,7 +569,7 @@
             },
         MENU_ITEM // SHARE_AIW
             {
-            command = KAiwCmdView;
+            command = ECamCmdShareSettings;
             // AIW provider fills the menu item title.
             // No submenu, only 1 provider acccepted.
             txt     = "";
--- a/camerauis/cameraapp/generic/data/vgacamsettings.rss	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/data/vgacamsettings.rss	Tue Apr 27 16:19:06 2010 +0300
@@ -856,16 +856,6 @@
             preference = EAknAudioPrefCamera;
             file = KCamAutoFocusSuccFile;
             volume = 5;
-            },
-        // Self-timer beep
-        AVKON_SOUND_INFO 
-            { 
-            sid = ECamSelfTimerSoundId; 
-            priority = EAvkonAlarmTonesPriority;
-            preference = EAknAudioPrefDefaultTone; 
-            sequencelength = 6;
-            sequence = { 0, 17, 6, 118, 10, 11 };
-            volume = 9; 
             }
          
         };
@@ -3272,11 +3262,12 @@
         {
         AIW_CRITERIA_ITEM // SHARE_AIW
             {
-            id = KAiwCmdView;
-            serviceCmd = KAiwCmdView;
-            contentType = "*";
-            defaultProvider     = 0x2002CC1F; //KShareAppUidVal;	    
+            id              = ECamCmdShareSettings;
+            serviceCmd      = KAiwCmdView;
+            contentType     = "*";
+            defaultProvider = 0x2002CC1F; //KShareAppUidVal;	    
             serviceClass = KAiwClassMenu;
+            maxProviders    = 1;
             }
         };
     }
--- a/camerauis/cameraapp/generic/inc/CamAppController.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamAppController.h	Tue Apr 27 16:19:06 2010 +0300
@@ -1028,15 +1028,6 @@
     */
     void PlaySound( TCamSoundId aSoundId, TBool aEnableCallback );
 
-    /**
-    * Initiates the playing of the specified tone
-    * @since 2.8
-    * @param aToneHz The frequency of the tone to play in Hertz
-    * @param aLenMicSec The length of tone to play in microseconds
-    * @param aVolume The volume of the tone, range 0.0 to 1.0
-    * @param aEnableCallback Whether to be called back when playback complete
-    */
-    void PlayTone( TInt aToneHz, TInt aLenMicSec, TReal32 aVolume,  TBool aEnableCallback );
 
     /** 
     * Releases the camera hardware for other apps to use
@@ -1171,6 +1162,14 @@
      */
     TCamEvCompRange EvRange() const;
 
+    /**
+     * Switches camera to standby
+     * @since 5.1
+     * @param aSratus Error code for Standby mode
+     * @return
+     */
+    void SwitchToStandbyL( TInt aStatus = KErrNone );
+    
   public: // Derived from MCamCallStateObserver base class     
     /**
     * Callback for when the current phone call state changes
@@ -2208,6 +2207,11 @@
          */
         TBool IsSaveStarted();
         
+        /**
+         * Getter for iIssueModeChangeSequenceSucceeded
+         */
+        TBool IssueModeChangeSequenceSucceeded();
+        
   private:
 
     // -----------------------------------------------------
@@ -2592,6 +2596,8 @@
     // orientation at capture time
     TCamImageOrientation  iCaptureOrientation;
     
+    TBool iIssueModeChangeSequenceSucceeded;
+    
     };
 
 #endif      // CAMAPPCONTROLLER_H
--- a/camerauis/cameraapp/generic/inc/CamAppUi.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamAppUi.h	Tue Apr 27 16:19:06 2010 +0300
@@ -224,6 +224,21 @@
         */
         TInt StandbyStatus() const;
 
+        /**
+         * returns ETrue if the stsnby status is recoverable
+         */
+        TBool IsRecoverableStatus();
+        
+        /**
+         * Change the standby status
+         */
+        TBool ChangeStandbyStatusL( TInt aError );
+        
+        /**
+        * returns Getter for iPreCaptureMode
+        */
+        TCamPreCaptureMode PreCaptureMode();
+        
         /*
         * Check for file name deletion/renaming outside camera
         */
@@ -842,8 +857,8 @@
         void SetSuppressUIRiseOnViewfinderStart(TBool aSuppress);
         
         /**
-        * Whether the current capture was selftimer initiated
-        * @return ETrue if the current capture was started via selftimer
+        * Whether the latest capture was selftimer initiated
+        * @return ETrue if the latest capture was started via selftimer
         */
         TBool IsSelfTimedCapture() const;
 
@@ -1333,7 +1348,7 @@
         * returns ETrue if headset is connected
         */ 
         TBool IsHeadsetConnected() const;
-
+        
     public:
         /**
         * Display error note
--- a/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h	Tue Apr 27 16:19:06 2010 +0300
@@ -22,6 +22,8 @@
 
 //  INCLUDES
 #include <f32file.h>
+#include "campropertywatcher.h"
+#include "campropertyobserver.h"
 
 // FORWARD DECLARATIONS
 class MCamDriveChangeNotifierObserver;
@@ -39,7 +41,9 @@
         enum TCamDriveChangeType
             {
             EDriveDismount,
-            EDriveMount
+            EDriveMount,
+            EDriveUSBMassStorageModeOn,
+            EDriveUSBMassStorageModeOff
             };
             
     public: // New functions
@@ -64,7 +68,8 @@
 *
 *  @since 5.0
 */
-class CCamDriveChangeNotifier : public CBase
+class CCamDriveChangeNotifier : public CBase, 
+                                public MPropertyObserver
 
     {
     private:
@@ -74,7 +79,6 @@
                 static CCamDiskChangeListener* NewLC( 
                      RFs& aFs,
                      TDriveNumber aDrive,
-                     MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
                      CCamDriveChangeNotifier& aObserver );
                 ~CCamDiskChangeListener();
                 
@@ -85,7 +89,6 @@
                 CCamDiskChangeListener( 
                      RFs& aFs,
                      TDriveNumber aDrive,
-                     MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
                      CCamDriveChangeNotifier& aObserver );
                 
             private:
@@ -102,10 +105,9 @@
             private:
                 RFs& iFs;
                 TDriveNumber iDrive;
-                MCamDriveChangeNotifierObserver::TCamDriveChangeType iType;
                 CCamDriveChangeNotifier& iObserver;
             };
-
+        
     public:  // Constructors and destructor
 
         /**
@@ -137,6 +139,14 @@
         void StartMonitoring();
         void CancelMonitoring();
 
+    public: // From MPropertyObserver
+        /**
+        * The value of a watched property has changed
+        * @param aCategory The category of the property
+        * @param aKey the Identifier of the property
+        */    
+        void HandlePropertyChangedL( const TUid& aCategory, const TUint aKey );
+        
     private:
 
         /**
@@ -145,6 +155,8 @@
         CCamDriveChangeNotifier( 
                                 RFs& aFs,
                                 MCamDriveChangeNotifierObserver& aObserver );
+        
+        void ConstructL();
 
     private:    // Data
         // Ref.
@@ -154,6 +166,10 @@
         RFs& iFs;
 
         RPointerArray<CCamDiskChangeListener> iListeners;
+        
+        CCamPropertyWatcher* iUsbMSWatcher;
+        
+        TBool iMassStorageModeOn;
 
     };
 
--- a/camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamPreCaptureViewBase.h	Tue Apr 27 16:19:06 2010 +0300
@@ -159,6 +159,14 @@
         * @return ETrue if started.
         */
         virtual TBool StartMskCaptureL() = 0;
+        
+        
+        /**
+        * Getter for iCaptureSetupModeActive
+        * @since 9.2
+        * @return iCaptureSetupModeActive
+        */
+        TBool IsSetupModeActive();
 
     protected:    // Functions from base classes
 
--- a/camerauis/cameraapp/generic/inc/CamSoundPlayer.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamSoundPlayer.h	Tue Apr 27 16:19:06 2010 +0300
@@ -20,7 +20,6 @@
 #define CAMSOUNDPLAYER_H
 
 //  INCLUDES
-#include <MdaAudioTonePlayer.h>
 #include <MdaAudioSamplePlayer.h>
 #include "Cam.hrh" // For TCamSoundId
 
@@ -59,8 +58,7 @@
 *  @since 2.8
 */
 class CCamSoundPlayer : public CBase,
-                        public MMdaAudioPlayerCallback,
-                        public MMdaAudioToneObserver
+                        public MMdaAudioPlayerCallback
     {
     public:  // Constructors and destructor
         
@@ -91,16 +89,7 @@
         */
         void PlaySound( TCamSoundId aSound, TBool aEnableCallback );
 
-        /**
-        * Initiates the playing of the specified tone
-        * @since 2.8
-        * @param aToneHz The frequency of the tone to play in Hertz
-        * @param aLenMicSec The length of tone to play in microseconds
-        * @param aVolume The volume of the tone, range 0.0 to 1.0
-        * @param aEnableCallback Whether to be called back when playback complete
-        */
-        void PlayTone( TInt aToneHz, TInt aLenMicSec, TReal32 aVolume, TBool aEnableCallback );
-
+      
         /**
         * Called to disable certain key press clicks
         * @since 2.8 
@@ -127,11 +116,6 @@
         */
         void EnableAllKeySounds();
         
-        /**
-        * Cancels any outstanding tone player activity
-        * @since 3.0
-        */
-        void CancelTonePlayer();
 
     public: // Functions from base classes
         /**
@@ -146,18 +130,6 @@
         * @since 2.8
         */
         void MapcPlayComplete( TInt aError );
-
-        /**
-        * From MMdaAudioToneObserver.
-        * @since 2.8
-        */
-        void MatoPrepareComplete( TInt aError );
-
-        /**
-        * From MMdaAudioToneObserver.
-        * @since 2.8
-        */
-        void MatoPlayComplete( TInt aError );
         
     private:
 
@@ -181,22 +153,11 @@
         */
         void StartPlaySound( const TDesC& aFile, const TBool aEnableCallback );
 
-        /**
-        * Starts procedure to play audio Tone (and RNG) files. Internal function
-        * @since 2.8 
-        * @param aFile The file to open
-        * @param aEnableCallback Whether to call back when play complete
-        */
-        void StartPlayTone( const TDesC& aFile, const TBool aEnableCallback );
-
     public:     // Data
 
         // Audio player utility for WAV sounds (eg Video Recording)
         CMdaAudioPlayerUtility* iAudioPlayer;
 
-        // Tone player for TONES (eg Video recording when in call)
-        CMdaAudioToneUtility* iTonePlayer;
-
         // Key sound system for Self-timer sound and camera shutter.
         CAknKeySoundSystem* iKeySoundSystem;
 
@@ -218,8 +179,6 @@
         // Whether all keys have been silenced
         TBool iAllKeysSilent;        
 
-        // Whether a tone is currently playing
-        TBool iTonePlayInProgress;
         };
 
 #endif      // CAMSOUNDPLAYER_H   
--- a/camerauis/cameraapp/generic/inc/CamStandbyContainer.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamStandbyContainer.h	Tue Apr 27 16:19:06 2010 +0300
@@ -90,6 +90,12 @@
         * @since 2.8
         */
         TInt GetStandbyError() const;
+        
+        /**
+        * Sets the current error and updates the label text and cba
+        * @since 5.1
+        */
+        void SetStandbyErrorL( TInt aError );
 
     private:
         /**
--- a/camerauis/cameraapp/generic/inc/CamUserSceneSetupViewBase.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamUserSceneSetupViewBase.h	Tue Apr 27 16:19:06 2010 +0300
@@ -202,8 +202,6 @@
         
     protected:
 
-    private:   // data
-
         // Specifies whether the user scene setup mode is active
         TBool iUserSceneSetupModeActive;
 
--- a/camerauis/cameraapp/generic/inc/CamViewBase.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamViewBase.h	Tue Apr 27 16:19:06 2010 +0300
@@ -168,6 +168,13 @@
          * 
          */
         virtual void UpdateToolbarIconsL();
+        
+        /**
+        * Sets the standby to the current error if the current state is in standby; else does nothing
+        * @since 5.1
+        * @aError System wide error code
+        */
+        virtual void SetStandbyStatusL( TInt aError );
 
     public: // Functions from base classes
 
--- a/camerauis/cameraapp/generic/inc/audioplayer/camaudioplayercontroller.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/audioplayer/camaudioplayercontroller.h	Tue Apr 27 16:19:06 2010 +0300
@@ -31,7 +31,6 @@
 class CCamAppController;
 class MCamAudioPlayerObserver;
 class CCamPlayerWrapperBase;
-class CCamTonePlayerWrapper;
 
 // ===========================================================================
 // Class definitions
@@ -81,15 +80,6 @@
     *                  callback to MCamAudioPlayerObserver::PlayComplete
     */
     void PlaySound( TInt  aSoundId, 
-                    TBool aCallback );
-
-    /**
-    * @param aCallback If set ETrue, calling method this results in one 
-    *                  callback to MCamAudioPlayerObserver::PlayComplete
-    */
-    void PlayTone( TInt    aToneInHz, 
-                   TInt    aLengthInUs, 
-                   TReal32 aVolumeInPercent, 
                    TBool   aCallback );
 
     /**
@@ -139,7 +129,6 @@
     MCamPlayerObserver&                  iObserver;
 
     RPointerArray<CCamPlayerWrapperBase> iPlayers;
-    CCamTonePlayerWrapper*               iTonePlayer;
 
     TInt                                 iCameraMode;     // TCamCameraMode value
     TInt                                 iCaptureSoundId; // Sound id or -1 if not set
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camimagedecoder.h	Tue Apr 27 16:19:06 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"
@@ -48,7 +48,7 @@
     *        KErrNone if all went as planned.
     * @param aBitmap Decoded bitmap. NULL if errors in decoding.
     */
-    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask ) = 0;
+    virtual void ImageDecodedL( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask ) = 0;
 
   };
   
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camsnapshot.h	Tue Apr 27 16:19:06 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"
@@ -84,7 +84,7 @@
     /**
     * @see MCamImageDecoderObserver
     */
-    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask );
+    virtual void ImageDecodedL( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask );
 
   // -------------------------------------------------------
   // from MCamBitmapScalerObserver
--- a/camerauis/cameraapp/generic/inc/camoneclickuploadutility.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/camoneclickuploadutility.h	Tue Apr 27 16:19:06 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-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"
@@ -86,12 +86,17 @@
     /**
      * Get the current one click icon
      */
-    void UpdateUploadIcon( CAknToolbar *aToolbar, TCamCameraMode aMode );
+    void UpdateUploadIconL( CAknToolbar *aToolbar, TCamCameraMode aMode );
     
     /**
+     * Launch Share settings view 
+     */
+    void LaunchShareSettings();
+
+    /**
      * From MCamImageDecoderObserver
      */
-    virtual void ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, 
+    virtual void ImageDecodedL( TInt aStatus, const CFbsBitmap* aBitmap, 
                                const CFbsBitmap* aMask );    
     
 private:
--- a/camerauis/cameraapp/generic/inc/camvideotime.h	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/camvideotime.h	Tue Apr 27 16:19:06 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-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"
@@ -49,7 +49,7 @@
                    TInt64 aCriticalLimit,
                    TInt   aVideoBitRate,
                    TInt   aAudioBitRate,
-                   TUint  aSizeLimit,
+                   TInt64 aSizeLimit,
                    TBool  aMuteAudio,
                    TReal  aBitrateScaler);    
   
@@ -73,7 +73,7 @@
     TInt64      iAvailableSpaceAtStart;
 
     // Size limit of the file in bytes
-    TUint       iSizeLimit;    
+    TInt64      iSizeLimit;
   };
   
 #endif // CAMVIDEOTIME_H
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -49,6 +49,7 @@
 #include <UsbWatcherInternalPSKeys.h>
 #include <usbpersonalityids.h>
 
+#include <UikonInternalPSKeys.h>
 
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
@@ -2143,22 +2144,25 @@
     case  ECamRequestCancelAutofocus:
     case ECamRequestStartAutofocus:
         {
-        if(iPendingAFRequest==0)
+        if( iPendingAFRequest == 0 ||
+          ( !iAFCancelInProgress &&
+            iPendingAFRequest == ECamRequestCancelAutofocus &&
+            iCurrentAFRequest == ECamRequestCancelAutofocus ) )
             {
             if ( !( UiConfigManagerPtr()->IsContinuosAutofocusSupported()&& ECamControllerVideo == CurrentMode() ) ) 
-                            {
-            iPendingAFRequest=aAFRequest;
-            TRAPD( err, IssueDirectRequestL( TCamCameraRequestId(aAFRequest) ) );
-            //TRAPD( err, iCameraController->DirectRequestL( aAFRequest ) );            
-            if ( err != KErrNone )
                 {
-                // There is an error, we leave without focusing
-                iPendingAFRequest=0;
-                return EFalse; // Not doing any autofocus request.
-                //This is only case where AFrequest cause EFalse to be returned.
+                iPendingAFRequest=aAFRequest;
+                TRAPD( err, IssueDirectRequestL( TCamCameraRequestId(aAFRequest) ) );
+                //TRAPD( err, iCameraController->DirectRequestL( aAFRequest ) );            
+                if ( err != KErrNone )
+                    {
+                    // There is an error, we leave without focusing
+                    iPendingAFRequest=0;
+                    return EFalse; // Not doing any autofocus request.
+                    //This is only case where AFrequest cause EFalse to be returned.
+                    }
                 }
-            }
-            }
+            } 
         else
             {
             CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
@@ -2433,28 +2437,6 @@
 
 
 // ---------------------------------------------------------------------------
-// CCamAppController::PlayTone
-// Play a tone with specified frequency, period and volume
-// ---------------------------------------------------------------------------
-//
-void CCamAppController::PlayTone( TInt      aToneHz, 
-                                  TInt      aLenMicSec, 
-                                  TReal32   aVolume, 
-                                  TBool     aEnableCallback )
-  {    
-  if ( !iShutterSndAlwaysOn && 
-     iSilentProfile )
-    {
-    // don't play shutter sound if we are following
-    // current profile setting and profile is silent
-    }
-  else
-    {    
-    iSoundPlayer->PlayTone( aToneHz, aLenMicSec, aVolume, aEnableCallback );
-    }
-  }
-
-// ---------------------------------------------------------------------------
 // CCamAppController::AllOptionsVisibleForSettingItem
 // Returns true if all the settings list options for a particular setting
 // item are visible.
@@ -3001,23 +2983,55 @@
 
   if( !aStartup )
     {
-    GenerateModeChangeSequenceL( sequence );
-	
-	if( iCameraReferences ) 
-      {
-      SetFlags( iBusyFlags, EBusySequence );
-      TCleanupItem clearBusy( ClearSequenceBusyFlag, &iBusyFlags );
-      CleanupStack::PushL( clearBusy );
-      iCameraController->RequestSequenceL( sequence );
-      CleanupStack::Pop();
-   
-      iCaptureModeTransitionInProgress = ETrue;
-      
-      }
-    else 
-  	  {
-      PRINT( _L("Camera <> No camera users, not requesting sequence.") );
-      }
+    TBool usbPersonality = 0;
+    User::LeaveIfError ( RProperty::Get (KPSUidUsbWatcher, 
+                          KUsbWatcherSelectedPersonality, usbPersonality));
+    TInt mmcInserted = 0;
+    User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikMMCInserted, mmcInserted ) );
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+    
+    if(IntegerSettingValue(ECamSettingItemRemovePhoneMemoryUsage) &&
+            !IsMemoryAvailable(ECamMediaStorageMassStorage) &&
+            !IsMemoryAvailable(ECamMediaStorageCard) &&
+            ( appUi->PreCaptureMode() == ECamPreCapViewfinder ||
+              appUi->PreCaptureMode() == ECamPreCapGenericSetting ) )
+        {
+        if( KUsbPersonalityIdMS == usbPersonality )
+            {
+            SwitchToStandbyL( ECamErrMassStorageMode );
+            }
+        else if( !mmcInserted )
+            {
+            SwitchToStandbyL( ECamErrMemoryCardNotInserted );
+            }
+        else
+            {
+            CamPanic(ECamPanicInvalidState);
+            }
+        
+        iIssueModeChangeSequenceSucceeded = EFalse;
+        }
+    else
+        {
+        GenerateModeChangeSequenceL( sequence );
+        
+        if( iCameraReferences ) 
+            {
+            SetFlags( iBusyFlags, EBusySequence );
+            TCleanupItem clearBusy( ClearSequenceBusyFlag, &iBusyFlags );
+            CleanupStack::PushL( clearBusy );
+            iCameraController->RequestSequenceL( sequence );
+            CleanupStack::Pop();
+            
+            iCaptureModeTransitionInProgress = ETrue;
+            
+            }
+        else 
+            {
+            PRINT( _L("Camera <> No camera users, not requesting sequence.") );
+            }
+        iIssueModeChangeSequenceSucceeded = ETrue;
+        }  
     }
   else
     {
@@ -3028,6 +3042,7 @@
     CleanupStack::PushL( clearBusy );
     iCameraController->RequestSequenceL( sequence );
     CleanupStack::Pop();
+    iIssueModeChangeSequenceSucceeded = ETrue;
     }
   
   CleanupStack::PopAndDestroy(); // sequence.Close()
@@ -3431,8 +3446,8 @@
       IssueDirectRequestL( ECamRequestVfStop    );
       IssueDirectRequestL( ECamRequestSsRelease );
       IssueDirectRequestL( ECamRequestImageInit );
+      IssueDirectRequestL( ECamRequestVfStart   );
       IssueDirectRequestL( ECamRequestSsStart   );
-      IssueDirectRequestL( ECamRequestVfStart   );
       });
       
     if( KErrNone != status )
@@ -4306,7 +4321,7 @@
     case ECamSettingItemPhotoMediaStorage:
     case ECamSettingItemVideoMediaStorage:
       {
-      PRINT(_L("Camera SetIntegerSettingValueL calling SetPathnamesToNewStorageL" ))
+      PRINT1(_L("Camera SetIntegerSettingValueL calling SetPathnamesToNewStorageL %d" ), aSettingValue);
       // reset iForceUseOfPhoneMemory flag when user chooses 
       // from settings.
       iForceUseOfPhoneMemory = EFalse;
@@ -6369,7 +6384,6 @@
         // check if snapshot bitmap needs to be rotated before creating a thumbnail from it
         TBool rotate( ( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) || 
                       iInfo.iActiveCamera == ECamActiveCameraSecondary ) &&
-                      ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) &&
                       iCaptureOrientation != ECamOrientation0 );
 
         if ( ECamImageCaptureBurst != iInfo.iImageMode )
@@ -8947,21 +8961,12 @@
               }
           }
 
-      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();
-                }
-            }
-        }
+      if ( UiConfigManagerPtr()->IsLocationSupported() &&
+              ECamLocationOn == IntegerSettingValue( ECamSettingItemRecLocation ) )
+        {
+        StartLocationTrailL();
+        }
+
       //Check if profile is silent and/or camera tones are set off
       IsProfileSilent();
 
@@ -10332,8 +10337,8 @@
   									ECamSettingItemVideoAudioRec );
   TBool audioMute = ECamSettOff == audioRec;
   
+  TInt64 videoLimit =  KMaxTUint32; // 4G limit
   // Video file size limit (MMS case)
-  TInt videoLimit = 0;
   if( ECamVideoClipShort == level.VideoLength() )
     {
     // Short video, needs to fit into MMS message
@@ -10604,6 +10609,9 @@
 TInt CCamAppController::DriveChangeL( const TCamDriveChangeType aType )
   {
   PRINT1( _L("Camera => CCamAppController::DriveChangeL aType: %d" ), aType );
+  CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+  appUi->CheckMemoryAvailableForCapturing();
+  
     
   TCamCameraMode mode = CurrentMode();
   TCamMediaStorage currentStorage;
@@ -10624,7 +10632,7 @@
     {
     PRINT( _L("Camera <> Phone memory is the preferred storage location. Nothing to be done here. Return KErrNone.") )
     PRINT( _L("Camera <= CCamAppController::DriveChangeL" ) );
-    return KErrNone;
+
     }
    
   if  ( ( !IsMemoryAvailable( ECamMediaStorageCard, EFalse ) || 
@@ -10656,6 +10664,13 @@
       {
       iVideoRequested = EFalse;
       }
+    
+    if ( appUi->SelfTimerEnabled() && appUi->AllMemoriesFullOrUnavailable() )
+      {
+      PRINT( _L("Camera <> All storages full or unavailable. Cancel selftimer.") )
+      appUi->HandleCommandL( ECamCmdSelfTimerCancel );
+      }
+    
     if ( SequenceCaptureInProgress() )
       {
       PRINT( _L("Camera <> Sequence capture in progress. -> Stop and skip postcapture.") )
@@ -10674,26 +10689,15 @@
       // to switch to (forced) phone memory
       ForceUsePhoneMemoryL( ETrue ); 
       PRINT( _L("Camera <= CCamAppController::DriveChangeL dismount pending" ) );  	
-      return KErrNotReady;
+
       }
     else
       {    	           
       // Mass memory may be the forced storage location. Then it's necessary 
       // to switch to (forced) phone memory
       ForceUsePhoneMemoryL( ETrue );
-                
-      // Make sure toolbar is visible
-      CCamAppUi* appUi = static_cast<CCamAppUi*>( 
-                                                CEikonEnv::Static()->AppUi() );
-      CAknToolbar* fixedToolbar = appUi->CurrentFixedToolbar();
-      
-      if ( fixedToolbar && ECamNoOperation == CurrentOperation() )
-        {
-        fixedToolbar->SetToolbarVisibility( ETrue );
-        }
-        
       PRINT( _L("Camera <= CCamAppController::DriveChangeL dismount ok" ) );  	    
-      return KErrNone;
+
       }        
     }
   else if ( IsMemoryAvailable( iPreferredStorageLocation, ETrue ) &&
@@ -10714,6 +10718,45 @@
       }
     }
   
+  if( IntegerSettingValue(ECamSettingItemRemovePhoneMemoryUsage) )
+        {
+        if( aType == EDriveMount &&
+            !appUi->IsRecoverableStatus() )
+              {
+              SwitchToStandbyL( KErrNone );
+              }
+          else if( aType == EDriveDismount &&
+                  appUi->IsRecoverableStatus() )
+              {
+              TInt mmcInserted = 0;
+              User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikMMCInserted, mmcInserted ) );
+              if( !IsMemoryAvailable(ECamMediaStorageMassStorage) &&
+                   !IsMemoryAvailable(ECamMediaStorageCard) )
+                  {
+                  if( mmcInserted )
+                      {
+                      SwitchToStandbyL( ECamErrMassStorageMode );
+
+                      }
+                  else
+                      {
+                      SwitchToStandbyL( ECamErrMemoryCardNotInserted );
+
+                      }
+                  }
+              }
+          else if ( aType == EDriveUSBMassStorageModeOn )
+              {
+              SwitchToStandbyL(ECamErrMassStorageMode);
+
+              }
+          else if ( aType == EDriveUSBMassStorageModeOff )
+              {
+              SwitchToStandbyL( KErrNone );
+              }
+        }
+    
+
   PRINT( _L("Camera <= CCamAppController::DriveChangeL" ) );  	
   return KErrNone;
   }
@@ -10995,7 +11038,7 @@
         }    
     iRotatorAo->RotateL( iRotatedSnapshot, MapCamOrientation2RotationAngle( iCaptureOrientation ) );
         
-    CleanupStack::Pop( snapshot );
+    CleanupStack::PopAndDestroy(snapshot);
     PRINT( _L( "Camera <= CCamAppController::RotateSnapshotL" ) );    
     } 
     
@@ -11016,8 +11059,10 @@
         }
     TRAP_IGNORE( iImageSaveActive->CreateThumbnailsL( *iRotationArray ) );
             
+    delete iRotatedSnapshot; 
+    iRotatedSnapshot = NULL;
     PRINT( _L( "Camera <= CCamAppController::RotationCompleteL" ) );         
-        }     
+    }     
       
 // ---------------------------------------------------------------------------
 // CCamAppController::StoreFaceTrackingValue
@@ -11130,14 +11175,13 @@
         {
         PRINT( _L("Camera => CCamAppController::ToggleWideScreenQuality - image mode") );
         TInt qualityIndex = IntegerSettingValue( ECamSettingItemPhotoQuality );
-        if ( qualityIndex <= ECamImageQualityPrintW9m )
+        if ( qualityIndex <= EImageQualityPrint )
             {
-            TCamPhotoQualitySetting imageQuality = iConfiguration->ImageQuality( qualityIndex );
-            if ( ( imageQuality.iPhotoResolution == EImageResolution12MP &&  aWide ) || 
-                 ( imageQuality.iPhotoResolution == EImageResolutionW9MP && !aWide ) )
+            if ( ( qualityIndex == EImageQualityPrintHigh &&  aWide )  
+                 || ( qualityIndex == EImageQualityPrint && !aWide ) )
                 {
-                qualityIndex = (ECamImageQualityPrintW9m==qualityIndex) ? ECamImageQualityPrint12m 
-                                                                        : ECamImageQualityPrintW9m;
+                qualityIndex = (EImageQualityPrint==qualityIndex) ? EImageQualityPrintHigh 
+                                                                  : EImageQualityPrint;
 
                 // Ensure that the setting value is enabled/usable.
                 if ( iSettingsModel->SettingValueEnabled( ECamSettingItemPhotoQuality, qualityIndex ) )
@@ -11190,5 +11234,58 @@
     {
     return iSaveStarted;    
     }
+
+// ---------------------------------------------------------------------------
+// CCamAppController::SwitchToStandby
+// 
+// ---------------------------------------------------------------------------
+//
+void CCamAppController::SwitchToStandbyL( TInt aStatus )
+    {
+    PRINT( _L("Camera => CCamAppController::SwitchToStandbyL") );
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+    __ASSERT_DEBUG( appUi, CamPanic( ECamPanicNullPointer ) );
+    if( !appUi->ChangeStandbyStatusL(aStatus) )
+        {
+        SetOperation( ECamStandby, aStatus );
+        iIdleTimer->Cancel();
+
+        // Use backlight timer also with bitmap vf
+        if( iBacklightTimer )
+            {
+            if( ECamTriActive == iCameraController->ViewfinderState() )
+                {
+                User::ResetInactivityTime();
+                }
+            iBacklightTimer->Cancel();
+            }
+        }
+    switch( aStatus )
+        {
+        case ECamErrMassStorageMode:
+        case ECamErrMemoryCardNotInserted:
+            {
+            iCurrentStorage = static_cast<TCamMediaStorage>(IntegerSettingValueUnfiltered( ECamSettingItemPhotoMediaStorage ));
+            }
+            break;
+        default:
+            {
+            SetIntegerSettingValueL( ECamSettingItemPhotoMediaStorage, iCurrentStorage );
+            SetIntegerSettingValueL( ECamSettingItemVideoMediaStorage, iCurrentStorage );
+            }
+            break;
+        }
+    PRINT( _L("Camera <= CCamAppController::SwitchToStandbyL") );
+    }	
+
+// ---------------------------------------------------------------------------
+// CCamAppController::IssueModeChangeSequenceSucceeded
+// 
+// ---------------------------------------------------------------------------
+//
+TBool CCamAppController::IssueModeChangeSequenceSucceeded()
+    {
+    return iIssueModeChangeSequenceSucceeded;
+    }
 //  End of File  
 
--- a/camerauis/cameraapp/generic/src/CamAppui.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamAppui.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -646,8 +646,6 @@
   iLostFocusToNewWindow = EFalse;
   iFirstVFStart = ETrue;
 
-  iInternalStorage = iController.ExistMassStorage()?ECamMediaStorageMassStorage:ECamMediaStoragePhone;
-
   if ( !uiOrientationOverride )
     {
     iUiConstructionComplete = ETrue;
@@ -2195,6 +2193,11 @@
                   }
                 }
               }
+          if ( iInSelfTimerMode != ECamSelfTimerDisabled )
+              {
+              // This is set to false when StartCaptureL() is run
+              iSelfTimedCapture = ETrue;
+              }
           }
       
       // Always switch to post capture view if self timer is enabled
@@ -2375,8 +2378,6 @@
           }
         }
             // reset the selftimed capture flag for next capture
-            PRINT( _L("resetting iSelfTimedCapture") )
-            iSelfTimedCapture = EFalse;
       break;
       }     
     // -----------------------------
@@ -2680,7 +2681,7 @@
         else 
             {
             PRINT( _L( "Camera <> CCamAppUi::HandleStandbyEventL: call iView->ExitAllModesL") );
-            PRINT1( _L( "Camera <> CCamAppUi::HandleStandbyEventL: iView = 0x%x"), iView );
+            PRINT2( _L( "Camera <> CCamAppUi::HandleStandbyEventL: iView = 0x%x, iViewId = %d"), iView, iView->Id().iUid );
             // Exit any special modes.
             // If AppUI construction is not finished, do it first, otherwise
             // the view has not been created yet
@@ -2694,7 +2695,11 @@
               {    
               if( iView)
                   {
-                  static_cast<CCamViewBase*>( iView )->ExitAllModesL();
+                  CCamViewBase* view  = dynamic_cast<CCamViewBase*>( iView );
+                  if( view )
+                      {
+                      view->ExitAllModesL();
+                      }
                   }
               }
              
@@ -4857,6 +4862,7 @@
     {
     PRINT( _L("Camera => CCamAppUi::StartCaptureL") );
     iLensCoverExit = EFalse; 
+    iSelfTimedCapture = EFalse;
     if ( iMode != ECamControllerVideo )
         {
         // Check for active viewfinder before proceeding with capture
@@ -5149,6 +5155,18 @@
         // this will exit when any current process completes
         iController.EnterShutdownMode( EFalse );
         }
+    
+    if( iController.IntegerSettingValue( ECamSettingItemPhotoMediaStorage ) == ECamMediaStorageNone )
+        {
+        iController.SetIntegerSettingValueL(ECamSettingItemPhotoMediaStorage, iInternalStorage );
+        }
+    
+    if( iController.IntegerSettingValue( ECamSettingItemVideoMediaStorage ) == ECamMediaStorageNone )
+        {
+        iController.SetIntegerSettingValueL(ECamSettingItemVideoMediaStorage, iInternalStorage );
+        }
+        
+    
     PRINT( _L("Camera <= CCamAppUi::CloseAppL") )        
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_CLOSEAPPL, "e_CCamAppUi_CloseAppL 0" );
     
@@ -7379,7 +7397,7 @@
 //
 void CCamAppUi::SetPreCaptureModeL(TCamPreCaptureMode aMode)  
     {
-    PRINT(_L("Camera=>CCamAppUi::SetPreCaptureMode"))
+    PRINT1(_L("Camera=>CCamAppUi::SetPreCaptureMode aMode=%d"), aMode);
     iPreCaptureMode = aMode;
 
     CCamViewBase* precapView = NULL;
@@ -7837,7 +7855,7 @@
 
 // ---------------------------------------------------------------------------
 // CCamAppUi::IsSelfTimedCapture
-// Whether the current capture was selftimer initiated
+// Whether the latest capture was selftimer initiated
 // ---------------------------------------------------------------------------
 //         
 TBool CCamAppUi::IsSelfTimedCapture() const
@@ -8386,6 +8404,8 @@
     // Load the settings model static settings
     PRINT( _L("Camera <> call CCamAppController::LoadStaticSettingsL..") )
     iController.LoadStaticSettingsL( IsEmbedded() );
+    
+    iInternalStorage = static_cast<TCamMediaStorage>(iController.IntegerSettingValue( ECamSettingItemPhotoMediaStorage ));
     // store the userscene settings
     iController.StoreUserSceneSettingsL();
 
@@ -8576,4 +8596,83 @@
     return iStartupLogoController;
     }
 
+
+// -----------------------------------------------------------------------------
+// CCamAppUi::IsRecoverableStatus 
+// -----------------------------------------------------------------------------
+//
+TBool CCamAppUi::IsRecoverableStatus()
+    {
+    TBool ret = ETrue;
+    switch(iStandbyStatus)
+        {
+        case ECamErrMassStorageMode:
+        case ECamErrMemoryCardNotInserted:
+            ret = EFalse;
+            break;
+        default:
+            break;
+        }
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// CCamAppUi::ChangeStandbyStatusL 
+// -----------------------------------------------------------------------------
+//
+TBool CCamAppUi::ChangeStandbyStatusL( TInt aError )
+    {
+    PRINT( _L("Camera => CCamAppUi::ChangeStandbyStatusL") );
+    TBool ret = ETrue;
+    if( ECamViewStateStandby == iViewState )
+        {
+        CCamViewBase* view = static_cast<CCamViewBase*>( iView );
+        if( view )
+            {
+            PRINT( _L("Camera <> CCamAppUi::ChangeStandbyStatusL ECamViewStateStandby") );
+            view->SetStandbyStatusL( aError );
+            }
+        else
+            {
+            ret = EFalse;
+            }
+        }
+    else if( ECamViewStatePreCapture == iViewState )
+        {
+        CCamPreCaptureViewBase* view = static_cast<CCamPreCaptureViewBase*>( iView );
+        PRINT( _L("Camera <> CCamAppUi::ChangeStandbyStatusL ECamViewStatePreCapture") );
+        if( view ) 
+            {
+            if( TBool(ETrue)  == view->IsSetupModeActive() ) // Boolean corruption
+                {
+                ret = ETrue;
+                }
+            else
+                {
+                ret = EFalse;
+                }
+            }
+        }
+    else
+        {
+        if( ECamViewStatePreCapture ==  iTargetViewState  || ECamPreCapViewfinder == iPreCaptureMode)
+            {
+            ret = EFalse;
+            }
+        PRINT3( _L("Camera <> CCamAppUi::ChangeStandbyStatusL iViewState=%d iTargetViewState=%d iPreCaptureMode=%d"), iViewState, iTargetViewState, iPreCaptureMode );
+        }
+    PRINT1( _L("Camera <= CCamAppUi::ChangeStandbyStatusL ret=%d"), ret);
+    return ret;
+    }
+
+// -----------------------------------------------------------------------------
+// CCamAppUi::PreCaptureMode 
+// -----------------------------------------------------------------------------
+//
+TCamPreCaptureMode CCamAppUi::PreCaptureMode()
+    {
+    PRINT1( _L("Camera <> CCamAppUi::PreCaptureMode %d"), iPreCaptureMode);
+    return iPreCaptureMode;
+    }
+
 //  End of File
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -399,7 +399,17 @@
          ( IsCaptureKeyL( aKeyEvent, aType ) || IsShutterKeyL( aKeyEvent, aType ) ) ) )  
         {
         TKeyResponse response = iCaptureSetupControl->OfferKeyEventL( aKeyEvent, aType );
-        iView.HandleCommandL( EAknSoftkeyOk );
+        if ( aType == EEventKeyDown && IsShutterKeyL( aKeyEvent, aType ) && 
+            ( ECamSettingItemDynamicPhotoFlash == iControlHandler.SettingType() ||
+            ECamSettingItemDynamicSelfTimer == iControlHandler.SettingType() ) )
+            {
+            iView.HandleCommandL( EAknSoftkeyCancel );
+            }
+            else
+            {
+            iView.HandleCommandL( EAknSoftkeyOk );
+            }
+        
         return response;
         }
     return iCaptureSetupControl->OfferKeyEventL( aKeyEvent, aType );
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -341,7 +341,8 @@
 // ---------------------------------------------------------------------------
 //
 CCamCaptureSetupViewBase::CCamCaptureSetupViewBase( CCamAppController& aController )
-    : CCamViewBase( aController ),iForceAvkonCBA(EFalse)
+    : CCamViewBase( aController ),iForceAvkonCBA(EFalse),
+      iCaptureSetupModeActive( EFalse )
     {
     }
 
@@ -1057,6 +1058,8 @@
 //
 void CCamCaptureSetupViewBase::SetSceneSettingMode(TBool aActive)
     {
+    TUid view = Id();
+    TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
     // This should be the only place iSceneSettingModeActive is set!
     // We need to inform the AppUi
     iSceneSettingModeActive = aActive;
@@ -1069,8 +1072,8 @@
             {
             appUi->SetPreCaptureMode(ECamPreCapSceneSetting);
             iChangeButtonPressed = EFalse; 
-            }
-        else if ( iChangeButtonPressed )
+            } // userSceneActive to avoit toolbar flicker after back from scene setting
+        else if ( iChangeButtonPressed || userSceneActive )
         	{
         	// transfering to user scene setup view
         	 appUi->SetPreCaptureMode(ECamPreCapSceneSetting);
@@ -1118,7 +1121,7 @@
     // This should be the only place iCaptureSetupModeActive is set!
     // We need to inform the AppUi
     iCaptureSetupModeActive = aActive;
-
+    PRINT1( _L("Camera <> CCamCaptureSetupViewBase::SetCaptureSetupModeActive iCaptureSetupModeActive=%d"),iCaptureSetupModeActive);
     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
     
     if ( appUi)
--- a/camerauis/cameraapp/generic/src/CamDriveChangeNotifier.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamDriveChangeNotifier.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -19,12 +19,18 @@
 
 // INCLUDE FILES
 #include    <pathinfo.h>
+#include    <driveinfo.h>
+#include    <usbwatcherinternalpskeys.h>
+#include    <usbpersonalityids.h>
 
 #include    "CamDriveChangeNotifier.h"
 #include    "camlogging.h"
 #include    "CamUtility.h"
 
 
+_LIT(KDriveE, "E:\\");
+_LIT(KDriveF, "F:\\");
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -35,13 +41,12 @@
     CCamDriveChangeNotifier::CCamDiskChangeListener::NewLC(
                   RFs& aFs,
                   TDriveNumber aDrive,                                         
-                  MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
                   CCamDriveChangeNotifier& aObserver )
   {
   PRINT( _L( "Camera => CCamDiskChangeListener::NewLC" ) );
 
   CCamDiskChangeListener* self = 
-        new( ELeave ) CCamDiskChangeListener( aFs, aDrive, aType, aObserver );
+        new( ELeave ) CCamDiskChangeListener( aFs, aDrive, aObserver );
   CleanupStack::PushL( self );
 
   PRINT( _L( "Camera <= CCamDiskChangeListener::NewLC" ) );
@@ -66,12 +71,10 @@
 CCamDriveChangeNotifier::CCamDiskChangeListener::CCamDiskChangeListener(
                   RFs& aFs,
                   TDriveNumber aDrive,                                         
-                  MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
                   CCamDriveChangeNotifier& aObserver )
     : CActive( CActive::EPriorityIdle ),
       iFs( aFs ),
       iDrive( aDrive ),
-      iType( aType ),
       iObserver( aObserver )                                          
   {
   CActiveScheduler::Add( this );
@@ -89,7 +92,19 @@
     PRINT( _L( "Camera <> CCamDiskChangeListener::Start SetActive()" ) );
         
     // Start listening for change events
-    iFs.NotifyChange( ENotifyDisk, iStatus );
+    if(iDrive == EDriveE)
+        {
+        iFs.NotifyChange( ENotifyDisk, iStatus, KDriveE );
+        }
+    else if( iDrive == EDriveF )
+        {
+        iFs.NotifyChange( ENotifyDisk, iStatus, KDriveF );
+        }
+    else
+        {
+        iFs.NotifyChange( ENotifyDisk, iStatus );
+        }
+    
     SetActive();
     }
   PRINT( _L( "Camera <= CCamDiskChangeListener::Start" ) );
@@ -123,13 +138,30 @@
 //
 void CCamDriveChangeNotifier::CCamDiskChangeListener::RunL()
   {
-  PRINT2( _L( "Camera => CCamDiskChangeListener::RunL iType: %d, iStatus: %d" ), iType, iStatus.Int() );
+  PRINT1( _L( "Camera => CCamDiskChangeListener::RunL, iStatus: %d" ), iStatus.Int() );
   TInt ret = KErrNone;
   
   if ( iStatus == KErrNone )
     {
-    ret = iObserver.NotifyChangeL( iType );
-        
+    TUint driveStatus;  
+    ret = DriveInfo::GetDriveStatus(iFs, iDrive, driveStatus );
+    
+    if( ret == KErrNone)
+        {
+        if( !( driveStatus & DriveInfo::EDrivePresent ) ||
+                ( ( driveStatus & DriveInfo::EDrivePresent ==  DriveInfo::EDrivePresent ) &&
+                  ( driveStatus & DriveInfo::EDriveInUse ==  DriveInfo::EDriveInUse ) ) )
+            {
+            RDebug::Print(_L("CCamDiskChangeListener::RunL Dismount:%d"),iDrive);
+            ret = iObserver.NotifyChangeL( MCamDriveChangeNotifierObserver::EDriveDismount );
+            }
+        else if( ( driveStatus & DriveInfo::EDrivePresent ) == DriveInfo::EDrivePresent )
+            {
+            RDebug::Print(_L("CCamDiskChangeListener::RunL Mount:%d"),iDrive);
+            ret = iObserver.NotifyChangeL( MCamDriveChangeNotifierObserver::EDriveMount );
+            }
+        }
+
     if( ret == KErrNone )
       {
       Start();
@@ -145,6 +177,7 @@
   PRINT( _L( "Camera <= CCamDiskChangeListener::RunL" ) );
   }
 
+                
 // -----------------------------------------------------------------------------
 // CCamDriveChangeNotifier::CCamDriveChangeNotifier
 // -----------------------------------------------------------------------------
@@ -170,17 +203,8 @@
   CCamDriveChangeNotifier* self =
                       new( ELeave ) CCamDriveChangeNotifier( aFs, aObserver );
   
-  self->iListeners.AppendL( CCamDiskChangeListener::NewLC( self->iFs, EDriveE, 
-                      MCamDriveChangeNotifierObserver::EDriveMount, *self ) );
-    
-  self->iListeners.AppendL( CCamDiskChangeListener::NewLC( self->iFs, EDriveD, 
-                      MCamDriveChangeNotifierObserver::EDriveMount, *self ) );
+  self->ConstructL();
   
-  CleanupStack::Pop(); // listener
-  CleanupStack::Pop(); // listener 2
-    
-  self->StartMonitoring();
-
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::NewL" ) );
   return self;
   }
@@ -192,6 +216,15 @@
   PRINT( _L( "Camera => CCamDriveChangeNotifier::~CCamDriveChangeNotifier" ) );
   CancelMonitoring();
   iListeners.ResetAndDestroy();
+  if( iUsbMSWatcher )
+      {
+      if( iUsbMSWatcher->IsActive() )
+          {
+          iUsbMSWatcher->Cancel();
+          }
+      delete iUsbMSWatcher;
+      iUsbMSWatcher = NULL;
+      }
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::~CCamDriveChangeNotifier" ) );
   }
 
@@ -207,7 +240,9 @@
     {
     iListeners[i]->Start();
     }
-
+  
+  iUsbMSWatcher->Subscribe();
+  
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::StartMonitoring" ) );
   }
 
@@ -223,7 +258,7 @@
     {
     iListeners[i]->Stop();
     }
-
+  //iUsbMSWatcher->Cancel();
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::CancelMonitoring" ) );
   }
     
@@ -242,7 +277,7 @@
     PRINT( _L("Camera <> iFs.AllowDismount( EDriveE )") )
     iFs.AllowDismount( EDriveE );
     PRINT( _L("Camera <> iFs.AllowDismount( EDriveD )") )
-    iFs.AllowDismount( EDriveD );
+    iFs.AllowDismount( EDriveF );
     }
         
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::NotifyChangeL" ) );        
@@ -257,8 +292,61 @@
   {
   PRINT( _L( "Camera => CCamDriveChangeNotifier::SendAllowDismount" ) );
   iFs.AllowDismount( EDriveE );
-  iFs.AllowDismount( EDriveD );
+  iFs.AllowDismount( EDriveF );
   StartMonitoring();
   PRINT( _L( "Camera <= CCamDriveChangeNotifier::SendAllowDismount" ) );
-  }    
+  }
+
+// -----------------------------------------------------------------------------
+// CCamDriveChangeNotifier::HandlePropertyChangedL
+// -----------------------------------------------------------------------------
+//
+void CCamDriveChangeNotifier::HandlePropertyChangedL( const TUid& aCategory, const TUint aKey )
+    {
+    PRINT( _L( "Camera => CCamDriveChangeNotifier::HandlePropertyChangedL" ) );
+    TInt value = 0;
+    if(KPSUidUsbWatcher == aCategory && 
+       KUsbWatcherSelectedPersonality == aKey)
+        {
+        iUsbMSWatcher->Get( value );
+        if( KUsbPersonalityIdMS == value )
+            {
+            iMassStorageModeOn = ETrue;
+            iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOn );
+            }
+        else
+            {
+            if( iMassStorageModeOn )
+                {
+                iMassStorageModeOn = EFalse;
+                iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOff );
+                }
+            }
+        }
+    
+    PRINT( _L( "Camera <= CCamDriveChangeNotifier::HandlePropertyChangedL" ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CCamDriveChangeNotifier::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CCamDriveChangeNotifier::ConstructL()
+    {
+    
+    iListeners.AppendL( CCamDiskChangeListener::NewLC( iFs, EDriveE, 
+                          *this ) );
+    
+    iListeners.AppendL( CCamDiskChangeListener::NewLC( iFs, EDriveF, 
+                         *this ) );  
+    
+    iUsbMSWatcher = CCamPropertyWatcher::NewL(*this, KPSUidUsbWatcher, 
+                        KUsbWatcherSelectedPersonality );
+    
+    CleanupStack::Pop(); // listener
+    CleanupStack::Pop(); // listener 2
+    
+    StartMonitoring();
+
+    }
 //  End of File
--- a/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Tue Apr 27 16:19:06 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"
@@ -239,9 +239,12 @@
             iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdEdit, inputParams, iAiwServiceHandler->OutParamListL());        
             }
             break;
-        case KAiwCmdView: // SHARE_AIW
+        case ECamCmdShareSettings: // SHARE_AIW
+        case KAiwCmdView:
             {
-            iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdView, iAiwServiceHandler->InParamListL(), iAiwServiceHandler->OutParamListL());        
+            PRINT1( _L("Camera <> CCamPostCaptureViewBase::HandleCommandL - ECamCmdShareSettings start, cmd:%d"), aCommand );
+            iOneClickUploadUtility->LaunchShareSettings();
+            PRINT( _L("Camera <> CCamPostCaptureViewBase::HandleCommandL - ECamCmdShareSettings end") );            
             }
             break;
         default:
@@ -442,6 +445,14 @@
       }
     else
       {
+      // Update the one click, in case it was modified
+      if ( iOneClickUploadUtility && iOneClickUploadUtility->OneClickUploadSupported() )
+          {
+          iOneClickUploadUtility->UpdateUploadIconL( Toolbar(), 
+						  ( Id().iUid == ECamViewIdVideoPostCapture ) ? 
+        				    ECamControllerVideo : ECamControllerImage );
+          }
+
       // ensure cba is reset if we're not embedded
       if ( !iWaitForImageSave )
         {
@@ -571,7 +582,7 @@
                 {
                 fixedToolbar->SetToolbarObserver( this );
                 UpdateToolbarIconsL();
-                if(Id().iUid != ECamViewIdVideoPostCapture)
+                if( Id().iUid != ECamViewIdVideoPostCapture && !appui->IsSelfTimedCapture() )
                     {
                     fixedToolbar->SetDimmed(ETrue);
                     }
@@ -683,11 +694,11 @@
             aMenuPane->SetItemDimmed( ECamCmdAddToAlbum, ETrue );
             }
         }
-    // Hide menu item, if Share not available
+    // SHARE_AIW: Hide menu item, if Share not available
     if ( !iOneClickUploadUtility->OneClickUploadSupported() && 
-         aMenuPane->MenuItemExists( KAiwCmdView, itemPos ) )
+         aMenuPane->MenuItemExists( ECamCmdShareSettings, itemPos ) )
         {
-        aMenuPane->SetItemDimmed( KAiwCmdView, ETrue );
+        aMenuPane->SetItemDimmed( ECamCmdShareSettings, ETrue );
         }
     }
 
@@ -991,10 +1002,8 @@
                CAknButtonState* state = button->State();
                if ( state )
                    {
-                   state->SetHelpTextL(
-                           iOneClickUploadUtility->ButtonTooltipL() );
-                   
-                   iOneClickUploadUtility->UpdateUploadIcon( toolbar, iController.CurrentMode() );
+                   TRAP_IGNORE( state->SetHelpTextL( iOneClickUploadUtility->ButtonTooltipL() ) );
+                   iOneClickUploadUtility->UpdateUploadIconL( toolbar, iController.CurrentMode() );
                    }
                }
             button = dynamic_cast<CAknButton*>(toolbar->ControlOrNull( ECamCmdEdit ));
--- a/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -2685,6 +2685,18 @@
     PRINT( _L("Camera => CCamPreCaptureContainerBase::DrawResolutionIndicator") );
     iToggleCountdown--;
 
+    // Stop immediately the periodic timer for showing correctly 
+    // the text "Processing image" when capturing a still image. 
+    TBool stillCapturing = ECamControllerImage == iController.CurrentMode() && 
+                           ECamImageCaptureSingle == iController.CurrentImageMode() &&
+                           iController.IsProcessingCapture();
+    if ( stillCapturing )
+      {        
+      iBlinkResolutionIndicator = EFalse;
+      iIndBlinkTimer->Cancel();
+      return;
+      }  
+      
     // State changed, need to redraw
     ActivateGc();
 
--- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -48,6 +48,7 @@
 #include "CamPreCaptureViewBaseTraces.h"
 #endif
 
+#include "camstartuplogocontroller.h" 
 
 // ===========================================================================
 // Constants
@@ -546,7 +547,8 @@
         TBool noToolbar = (ECamCompleting == iController.CurrentOperation() ) && appUi->IsSecondCameraEnabled();
 
         if ( ECamCameraPreparedImage == iController.CameraState() &&
-               !appUi->IsBurstEnabled() && !noToolbar )
+               !appUi->IsBurstEnabled() && !noToolbar
+               && !iStandbyModeActive )
             {
             // Also fixed toolbar might need to be enabled.
             appUi->SetToolbarVisibility();
@@ -891,9 +893,9 @@
     {
     PRINT( _L("Camera => CCamPreCaptureViewBase::ExitCaptureSetupModeL") )
      
-    
+    CCamCaptureSetupViewBase::ExitCaptureSetupModeL();    
     iController.SetViewfinderWindowHandle( &iContainer->Window() );
-    CCamCaptureSetupViewBase::ExitCaptureSetupModeL();
+
     
     if( !iController.IsViewFinding() && !iController.InVideocallOrRinging() )
       {
@@ -1049,12 +1051,13 @@
       break;
     }
 
-  if ( iController.InVideocallOrRinging() )
+  if ( iController.InVideocallOrRinging() || !iController.IssueModeChangeSequenceSucceeded() )
       {
       return;
       }	
-      
+  
   appUi->HandleCommandL(ECamCmdSwitchToPrecapture);
+  
 
   if ( !( iController.UiConfigManagerPtr() && 
             iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() ) )
@@ -1293,7 +1296,17 @@
             fixedToolbar->SetToolbarVisibility( EFalse );
             }
         }
-  
+
+    // Hide the startup logo in standby mode. 
+    // Camera application will enter standby mode if it detect camera hardware is in use
+    // by another application (such as video call) when camera application is starting up. 
+    // If this, we need hiding startup logo in standby mode.
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() ); 
+    if ( appUi->StartupLogoController() )
+      {
+      appUi->StartupLogoController()->HideLogo();
+      }
+      
     // stop viewfinding
     StopViewFinder();
 
@@ -1771,6 +1784,7 @@
     if ( iGestureFw ) 
         {
         delete iGestureFw;
+        iGestureFw = NULL;
         }
 
     iGestureFw = CAknTouchGestureFw::NewL( *this, *iContainer );
@@ -1855,4 +1869,21 @@
     PRINT( _L("Camera <= CCamPreCaptureViewBase::HandleTouchGestureL") );
     }
 
+// ---------------------------------------------------------------------------
+// CCamPreCaptureViewBase::IsCaptureSetupMenuModeActive
+//
+// ---------------------------------------------------------------------------
+//
+TBool CCamPreCaptureViewBase::IsSetupModeActive()
+    {
+    TBool trueValue = ETrue;
+    TBool ret = ( iCaptureSetupModeActive == trueValue ||
+             iCaptureSetupMenuModeActive == trueValue || 
+             iSceneSettingModeActive == trueValue ||
+             iInfoListBoxActive == trueValue
+             );
+    PRINT1( _L("Camera <> CCamPreCaptureViewBase::IsSetupModeActive %d"), ret );
+    return ret;
+    }
 //  End of File  
+
--- a/camerauis/cameraapp/generic/src/CamPropertyWatcher.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPropertyWatcher.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -63,8 +63,11 @@
 void CCamPropertyWatcher::Subscribe()
     {
     PRINT( _L( "Camera => CCamPropertyWatcher::Subscribe()" ) )
-    iProperty.Subscribe( iStatus );
-    SetActive();
+    if(!IsActive())
+        {
+        iProperty.Subscribe( iStatus );
+        SetActive();
+        }
     PRINT( _L( "Camera <= CCamPropertyWatcher::Subscribe()" ) )
     }
 
--- a/camerauis/cameraapp/generic/src/CamSelfTimer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamSelfTimer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -33,8 +33,6 @@
 #endif
 
 // CONSTANTS
-const TInt    KCamSelfTimerToneHz  = 1760;         
-const TReal32 KCamSelfTimerToneVol = 0.75f;    
 
 
 // MACROS
@@ -477,7 +475,7 @@
     if ( aOn )        
         {        
         NotifyObservers( ECamSelfTimerEventTimerOn );
-        iController.PlayTone( KCamSelfTimerToneHz, iTimerTickPeriod.Int()/2, KCamSelfTimerToneVol, EFalse );
+        iController.PlaySound( ECamSelfTimerSoundId,  EFalse );
         }
     else
         {
--- a/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -583,6 +583,38 @@
         iView.HandleCommandL( EAknSoftkeySelect );
         return response;
         }
+    
+    if ( iController.UiConfigManagerPtr()
+         && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
+        {
+        if( aType == EEventKeyDown && IsShutterKeyL( aKeyEvent, aType ) )
+            {
+            TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
+            if( UserSceneHighlighted() )
+                {
+                iView.HandleCommandL( ECamCmdSelect );
+                }
+                else
+                {
+                iView.HandleCommandL( EAknSoftkeySelect );
+                }
+            return response;
+            }
+        }
+    else if( aType == EEventKeyDown && IsCaptureKeyL( aKeyEvent, aType ) )
+        {
+        TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
+        if( UserSceneHighlighted() )
+            {
+            iView.HandleCommandL( ECamCmdSelect );
+            }
+            else
+            {
+            iView.HandleCommandL( EAknSoftkeySelect );
+            }
+        return response;
+        }
+           
     TKeyResponse returnvalue = iListBox->OfferKeyEventL( aKeyEvent, aType );
 
     // for non touch, we use key presses to scroll thru the scene modes
--- a/camerauis/cameraapp/generic/src/CamSoundPlayer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamSoundPlayer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -36,13 +36,7 @@
 // EXTERNAL FUNCTION PROTOTYPES  
 
 // CONSTANTS
-#if 0 // Old constants that may be used again in the future
-const TInt KCamInCallToneHz = 1760;         
-const TInt KCamInCallToneLen= 450000;       
-_LIT( KCamSelfTimerSoundFile , "z:\\system\\sounds\\simple\\cameraappSelfTimer.rng" );
-#endif 
 
-const TReal32 KCamInCallToneVol = 0.75f;    
 
 _LIT( KCamAutoFocusComplete, "z:\\system\\sounds\\digital\\cameraappFocusSucc.wav" );
 //_LIT( KCamAutoFocusFailed,   "c:\\system\\sounds\\digital\\focus2.wav" ); NOT DEFINED YET
@@ -72,11 +66,6 @@
     {
     iAudioPlayer = CMdaAudioPlayerUtility::NewL( *this, 
                                                  KAudioPriorityCameraTone,
-                                                 TMdaPriorityPreference( KAudioPrefCamera ) );
-
-    iTonePlayer = CMdaAudioToneUtility::NewL( *this, 
-                                              NULL, 
-                                              KAudioPriorityVideoRecording,
                                               TMdaPriorityPreference( KAudioPrefCamera ) );
     }
 
@@ -111,8 +100,6 @@
     delete iAudioPlayer;
     }
   
-  CancelTonePlayer();    
-  delete iTonePlayer;
   PRINT( _L("Camera <= ~CCamSoundPlayer") );
   }
 
@@ -222,22 +209,15 @@
             StartPlaySound( KCamCaptureTone4(), aEnableCallback );         	
             break;
             } 
-#if 0
-        case ECamInCallToneId:
+
+        case ECamSelfTimerSoundId:
             {
-            PlayTone( KCamInCallToneHz, KCamInCallToneLen, KCamInCallToneVol, aEnableCallback );
+            StartPlaySound( KCamSelfTimerTone(), aEnableCallback );
             break;
             }
-#endif
     
         default:
             {
-            // Other sounds are played using the key sound system                
-#if !( defined(__WINS__) || defined(__WINSCW__) )
-#if 0
-            iKeySoundSystem->PlaySound( aSoundId );
-#endif            
-#endif
             iEnableCallback = EFalse;
             break;
             }
@@ -245,32 +225,6 @@
     PRINT( _L("Camera <= CCamSoundPlayer::PlaySound") );            
     }
 
-// -----------------------------------------------------------------------------
-// CCamSoundPlayer::PlayTone
-// Plays the requested tone
-// -----------------------------------------------------------------------------
-//
-void CCamSoundPlayer::PlayTone( TInt aToneHz, TInt aLenMicSec, TReal32 aVolume, TBool aEnableCallback )
-    {
-    if ( !iOpenFileInProgress )
-        {   
-        iOpenFileInProgress = ETrue;
-        TInt64 len = aLenMicSec;
-        iTonePlayer->PrepareToPlayTone( aToneHz, TTimeIntervalMicroSeconds( len ) );
-        iTonePlayer->SetVolume( static_cast<TInt>( aVolume * iTonePlayer->MaxVolume() ) );
-        }
-    else
-        {
-        if ( iEnableCallback )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }
-        }  
-
-    iEnableCallback = aEnableCallback;
-    }
-
 
 // ---------------------------------------------------------------------------
 // CCamSoundPlayer::StartPlaySound
@@ -308,48 +262,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CCamSoundPlayer::StartPlayTone
-// Attempts to begin playing the specified tone
-// ---------------------------------------------------------------------------
-//
-void CCamSoundPlayer::StartPlayTone( const TDesC& aFile, const TBool aEnableCallback )
-    {
-    // Check if we are already trying to open/play a tone, and stop it 
-    // if so
-    if ( iOpenFileInProgress )
-        {
-        iTonePlayer->CancelPrepare();
-        iOpenFileInProgress = EFalse;
-        if ( iEnableCallback )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }
-        }
-    else if ( iTonePlayInProgress )
-        {
-        iTonePlayer->CancelPlay();
-        iTonePlayInProgress = EFalse;
-        if ( iEnableCallback )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }
-        }    
-    else
-        {
-        // empty statement to remove Lint error.
-        }
-
-    iEnableCallback = aEnableCallback;
-
-    iOpenFileInProgress = ETrue;
-    iTonePlayer->PrepareToPlayFileSequence( aFile );
-    iTonePlayer->SetVolume( static_cast<TInt>( KCamInCallToneVol * iTonePlayer->MaxVolume() ) );
-    }
-
-
-// ---------------------------------------------------------------------------
 // CCamSoundPlayer::MapcInitComplete
 // CMdaAudioPlayerUtility initialization complete
 // ---------------------------------------------------------------------------
@@ -389,52 +301,6 @@
     }
 
 
-// ---------------------------------------------------------------------------
-// CCamSoundPlayer::MatoPrepareComplete
-// Tone prepare complete.
-// ---------------------------------------------------------------------------
-//
-void CCamSoundPlayer::MatoPrepareComplete( TInt aError )
-    {
-    iOpenFileInProgress = EFalse;
-
-    if ( !aError )
-        {
-        iTonePlayInProgress = ETrue;
-        iTonePlayer->Play();
-#ifdef __WINS__
-// The tone player does not give a call back on the emulator so
-// we have to force a callback here
-    MatoPlayComplete( KErrNone );
-#endif // __WINS__
-        }
-    else
-        {
-        if ( iEnableCallback )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CCamSoundPlayer::MatoPlayComplete
-// Tone playback complete.
-// ---------------------------------------------------------------------------
-//
-void CCamSoundPlayer::MatoPlayComplete( TInt /*aError*/ )
-    {
-    iTonePlayInProgress = EFalse;
-    if ( iEnableCallback )
-        {
-        iObserver->PlaySoundComplete();
-        iEnableCallback = EFalse;
-        }
-    }
-
-
 
 // ---------------------------------------------------------------------------
 // CCamSoundPlayer::DisableSelectionKeySoundL
@@ -498,39 +364,4 @@
         }
     }
 
-
-// ---------------------------------------------------------------------------
-// CCamSoundPlayer::CancelTonePlayer
-// Cancels any outstanding tone player activity
-// ---------------------------------------------------------------------------
-//
-void CCamSoundPlayer::CancelTonePlayer()
-    {
-    if ( iOpenFileInProgress && iTonePlayer )
-        {   
-        iTonePlayer->CancelPrepare();
-        iOpenFileInProgress = EFalse;
-
-        if ( iEnableCallback && iObserver )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }
-        }
-        
-    if ( iTonePlayInProgress && iTonePlayer )
-        {
-        iTonePlayer->CancelPlay();        
-        iTonePlayInProgress = EFalse;
-
-        if ( iEnableCallback && iObserver )
-            {
-            iObserver->PlaySoundComplete();
-            iEnableCallback = EFalse;
-            }        
-        }
-    }
-    
-
-
 //  End of File  
--- a/camerauis/cameraapp/generic/src/CamStandbyContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStandbyContainer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -29,6 +29,7 @@
 #include "CamUtility.h"
 #include "CamAppUi.h"
 #include "CamViewBase.h"
+#include "CamPanic.h"
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
 #include <ctsydomainpskeys.h>
@@ -97,64 +98,8 @@
     // AknBidiTextUtils::ConvertToVisualAndWrapToStringL
     iText->UseLogicalToVisualConversion( EFalse );
 
-    // Get label text from resource
-    HBufC* labelText;
-    if ( static_cast<CCamAppUi*>( iEikonEnv->AppUi() )->IsConstructionComplete() )
-        {
-	    switch( aError )
-	        {
-	        case KErrNone:
-	            labelText = StringLoader::LoadLC( R_CAM_STANDBY_TEXT );
-	            break;
-	        case KErrInUse:
-	            labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_IN_USE_TEXT );
-	            break;
-	        case KErrNoMemory:
-	        	labelText = StringLoader::LoadLC( R_CAM_MEMLO_NOT_ENOUGH_MEMORY );
-	            break;
-	        case KErrPermissionDenied:
-	            labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_DISABLED_TEXT );
-                break;
-	        default: // any other error
-	            labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_UNAVAILABLE_TEXT );
-	            break;
-	        }
-        }
-	 else
-        {
-        labelText = StringLoader::LoadLC( R_CAM_STANDBY_EMPTY_TEXT );
-        }        
-
-
-    iText->SetTextL( *labelText );
-    // Wrap the text, where it doesn't fit.
-    // ...Create the line width array necessary for ConvertToVisual..()
-    const TInt KLabelMaxLines = 5;
-    CArrayFix<TInt>* lineWidths = 
-        new ( ELeave ) CArrayFixFlat<TInt> ( KLabelMaxLines );
-    CleanupStack::PushL( lineWidths );
-    for (TInt i = 0; i < KLabelMaxLines; ++i )
-        {
-        lineWidths->AppendL( aRect.Width() );            
-        }
-    // ...Create the text buffer that will receive the wrapped text.
-    iWrappedLabelText = HBufC::NewL(
-        labelText->Length() + KLabelMaxLines * ( KAknBidiExtraSpacePerLine + 1 ) );
-    TPtr ptr = iWrappedLabelText->Des();
-    // ...Get the wrapped text conversion.
-    AknBidiTextUtils::ConvertToVisualAndWrapToStringL(
-        labelText->Des(),
-        *lineWidths,
-        *AknLayoutUtils::FontFromId( EAknLogicalFontPrimaryFont ),
-        ptr,
-        ETrue
-        );
-    // ...Cleanup
-    CleanupStack::PopAndDestroy( lineWidths );  
-    CleanupStack::PopAndDestroy( labelText );
-
-    // Set the wrapped text to the label.
-    iText->SetTextL( *iWrappedLabelText );
+    SetStandbyErrorL( aError );
+    
 
     // Initialise foreground timer - used to delay the exit
     // from standby when foreground is gained
@@ -305,6 +250,11 @@
 //
 void CCamStandbyContainer::HandleForegroundEventL( TBool aForeground )
     {
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi());
+    if( appUi && !appUi->IsRecoverableStatus() )
+        {
+        return;
+        }
     if ( aForeground )
         {
         // start timer to delay exit from standby
@@ -372,7 +322,9 @@
         aPointerEvent.iType,
         aPointerEvent.iPosition.iX,
         aPointerEvent.iPosition.iY );
-
+      CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi());  
+      if(appUi && !appUi->IsRecoverableStatus())
+          return;
       TInt callType( EPSCTsyCallTypeUninitialized );
       RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallType, callType );
        if ( callType != EPSCTsyCallTypeH324Multimedia)
@@ -394,4 +346,80 @@
         KAknsIIDQsnBgAreaMain, Rect(), EFalse );
     }
 
+void CCamStandbyContainer::SetStandbyErrorL( TInt aError )
+    {
+    iStandbyError = aError;
+    __ASSERT_DEBUG( iText, CamPanic( ECamPanicNullPointer ) );
+    
+    HBufC* labelText;
+    if ( static_cast<CCamAppUi*>( iEikonEnv->AppUi() )->IsConstructionComplete() )
+        {
+        switch( aError )
+            {
+            case KErrNone:
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_TEXT );
+                break;
+            case KErrInUse:
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_IN_USE_TEXT );
+                break;
+            case KErrNoMemory:
+                labelText = StringLoader::LoadLC( R_CAM_MEMLO_NOT_ENOUGH_MEMORY );
+                break;
+            case KErrPermissionDenied:
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_DISABLED_TEXT );
+                break;
+            case ECamErrMassStorageMode:
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_STORAGE_INACCESSIBLE );
+                break;
+            case ECamErrMemoryCardNotInserted:
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_INSERT_MMC );
+                break;
+            default: // any other error
+                labelText = StringLoader::LoadLC( R_CAM_STANDBY_CAMERA_UNAVAILABLE_TEXT );
+                break;
+            }
+        }
+     else
+        {
+        labelText = StringLoader::LoadLC( R_CAM_STANDBY_EMPTY_TEXT );
+        }        
+
+
+    //iText->SetTextL( *labelText );
+    // Wrap the text, where it doesn't fit.
+    // ...Create the line width array necessary for ConvertToVisual..()
+    const TInt KLabelMaxLines = 5;
+    CArrayFix<TInt>* lineWidths = 
+        new ( ELeave ) CArrayFixFlat<TInt> ( KLabelMaxLines );
+    CleanupStack::PushL( lineWidths );
+    for (TInt i = 0; i < KLabelMaxLines; ++i )
+        {
+        lineWidths->AppendL( Rect().Width() );            
+        }
+    // ...Create the text buffer that will receive the wrapped text.
+    if( iWrappedLabelText )
+        {
+        delete iWrappedLabelText;
+        iWrappedLabelText = NULL;
+        }
+    iWrappedLabelText = HBufC::NewL(
+        labelText->Length() + KLabelMaxLines * ( KAknBidiExtraSpacePerLine + 1 ) );
+    TPtr ptr = iWrappedLabelText->Des();
+    // ...Get the wrapped text conversion.
+    AknBidiTextUtils::ConvertToVisualAndWrapToStringL(
+        labelText->Des(),
+        *lineWidths,
+        *AknLayoutUtils::FontFromId( EAknLogicalFontPrimaryFont ),
+        ptr,
+        ETrue
+        );
+    // ...Cleanup
+    CleanupStack::PopAndDestroy( lineWidths );  
+    CleanupStack::PopAndDestroy( labelText );
+
+    // Set the wrapped text to the label.
+    iText->SetTextL( *iWrappedLabelText );
+    iText->DrawNow();
+    }
+
 // End of File  
--- a/camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStillPostCaptureView.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -202,13 +202,14 @@
         case ECamCmdPrintIntent:
             {
             // we are 'embedding' Edit & Print apps
-          PRINT( _L("Camera => CCamStillPostCaptureView::HandleCommandL ECamCmdPrintIntent"))
+            PRINT( _L("Camera => CCamStillPostCaptureView::HandleCommandL ECamCmdPrintIntent"))
             static_cast<CCamAppUiBase*>( AppUi() ) ->SetEmbedding( ETrue );            
             }
             break;
-          
+
         default:
             {
+            PRINT1( _L("Camera => CCamStillPostCaptureView::HandleCommandL default cmd (%d)"), aCommand )
             // Handle AIW commands
             TInt aiwServiceCmd = iAiwServiceHandler->ServiceCmdByMenuCmd( aCommand );
             if ( aiwServiceCmd != KAiwCmdNone )
@@ -340,7 +341,7 @@
     // SHARE_AIW
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID),
             R_CAM_AIW_VIEW_INTEREST );
-   
+
     if ( iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport) )
         {    
         iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), 
@@ -438,10 +439,6 @@
     BaseConstructL( ROID(R_CAM_STILL_POST_CAPTURE_VIEW_ID));
     CCamPostCaptureViewBase::ConstructL();
   
-    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_SHARE_ON_OVI_INTEREST );
-    // SHARE_AIW
-    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_AIW_VIEW_INTEREST );
-    
 	iRockerKeyPress = EFalse;
     }
 
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -21,6 +21,7 @@
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
 #include <akntoolbar.h>
+#include <akntoolbarextension.h>
 #include <aknlayoutscalable_apps.cdl.h>
 
 #include "CamStillPreCaptureContainer.h"
@@ -742,6 +743,16 @@
         iController.StartAutoFocus();
         }
 
+      CAknToolbar* fixedToolbar = appui->CurrentFixedToolbar();
+      if ( appui->SelfTimerEnabled() && fixedToolbar )
+        {
+        CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
+        if ( extension )
+            {
+            extension->SetShown( EFalse );
+            }
+        }
+
       return EKeyWasConsumed;
       }
     else if ( aType == EEventKeyUp && !MSKCapture )
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Tue Apr 27 16:19:06 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"
@@ -709,9 +709,13 @@
     {
     PRINT( _L("Camera <> CCamStillPreCaptureView::UpdateCbaL: Setting standby softkeys..") );        
     if( KErrNone == appui->StandbyStatus() )
+	  {
       SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CONTINUE );
-    else
-      SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );
+	  }
+    else if( appui->IsRecoverableStatus() )
+	  {
+	  SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );
+	  }
     }
   else if( iInfoListBoxActive )
   	{
@@ -1282,34 +1286,56 @@
         {
         UpdateToolbarIconsL();
         if( aToolbar )
-                {            
-                if ( iEmbedded /* && appUi->IsSecondCameraEnabled()*/ )
+            {            
+            if ( iEmbedded /* && appUi->IsSecondCameraEnabled()*/ )
+                {
+                // Dim mode switch icon and disable tooltip
+                aToolbar->SetItemDimmed( ECamCmdNewVideo, ETrue, ETrue );
+               
+                CAknButton* videoModeButton = static_cast<CAknButton*>(
+                        aToolbar->ControlOrNull( ECamCmdNewVideo ) );
+                if ( videoModeButton ) 
                     {
-					aToolbar->SetItemDimmed(ECamCmdNewVideo, ETrue, ETrue);
+                    videoModeButton->SetDimmedHelpTextL( KNullDesC );
                     }
-                CAknToolbarExtension* extension = aToolbar->ToolbarExtension();
-
-                if( extension )
+               
+            
+            
+                if ( appUi && appUi->IsSecondCameraEnabled() )
                     {
-
-                    if ( iEmbedded )
+                    aToolbar->SetItemDimmed( ECamCmdPhotos, ETrue, ETrue );
+                    CAknButton* photosButton = static_cast<CAknButton*>(
+                            aToolbar->ControlOrNull( ECamCmdPhotos ) );
+                    if ( photosButton ) 
                         {
-						extension->HideItemL( ECamCmdNewVideo, ETrue );
-                        extension->HideItemL( ECamCmdTimeLapseSlider, ETrue );
-                        extension->HideItemL( ECamCmdPhotos, ETrue );
-                        }
-                    else
-                        {
-                        extension->HideItemL( ECamCmdNewVideo, EFalse );
-                        extension->HideItemL( ECamCmdToggleFacetracking, EFalse );
-                        extension->HideItemL( ECamCmdPhotos, EFalse );
-                        }
-                    if(aResourceId == ECamCmdToolbarExtension)
-                        {
-                        appUi->ZoomPane()->MakeVisible(EFalse,ETrue);
+                        // do not show tooltip for dimmed item
+                        photosButton->SetDimmedHelpTextL( KNullDesC );
                         }
                     }
                 }
+            CAknToolbarExtension* extension = aToolbar->ToolbarExtension();
+        
+            if( extension )
+                {
+        
+                if ( iEmbedded )
+                    {
+                    extension->HideItemL( ECamCmdNewVideo, ETrue );
+                    extension->HideItemL( ECamCmdTimeLapseSlider, ETrue );
+                    extension->HideItemL( ECamCmdPhotos, ETrue );
+                    }
+                else
+                    {
+                    extension->HideItemL( ECamCmdNewVideo, EFalse );
+                    extension->HideItemL( ECamCmdToggleFacetracking, EFalse );
+                    extension->HideItemL( ECamCmdPhotos, EFalse );
+                    }
+                if(aResourceId == ECamCmdToolbarExtension)
+                    {
+                    appUi->ZoomPane()->MakeVisible(EFalse,ETrue);
+                    }
+                }
+            }
         }
     
     PRINT2( _L("Camera <= CCamStillPreCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar );
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupContainer.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -26,6 +26,7 @@
 #include <AknIconArray.h>
 #include <barsread.h>
 #include <aknview.h>
+#include "CameraUiConfigManager.h"
 
 #include "CamUtility.h"
 
@@ -211,7 +212,9 @@
     {
     const TInt KSettingItemArrayGranularity = 5;
 
-    CreateWindowL();
+    CCamContainerBase::BaseConstructL( aRect );
+    
+    //CreateWindowL();
 
     // Create the listbox in the right style
     iUserSceneSetupList = new ( ELeave ) CAknSettingStyleListBox;
@@ -442,6 +445,23 @@
     const TKeyEvent& aKeyEvent,
     TEventCode aType )
     {
+    if ( iController.UiConfigManagerPtr()
+         && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
+        {
+        if( aType == EEventKeyDown && IsShutterKeyL( aKeyEvent, aType ) )
+            {
+            TKeyResponse response = iUserSceneSetupList->OfferKeyEventL( aKeyEvent, aType );
+            iView.HandleCommandL( EAknSoftkeyBack );
+            return response;
+            }
+        }
+    else if( aType == EEventKeyDown && IsCaptureKeyL( aKeyEvent, aType ) )
+        {
+        TKeyResponse response = iUserSceneSetupList->OfferKeyEventL( aKeyEvent, aType );
+        iView.HandleCommandL( EAknSoftkeyBack );
+        return response;
+        }
+       
 	return iUserSceneSetupList->OfferKeyEventL( aKeyEvent, aType );
     }
 
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -244,9 +244,9 @@
 void CCamUserSceneSetupViewBase::HandleForegroundEventL( TBool aForeground )
     {
     PRINT1( _L("Camera => CCamUserSceneSetupViewBase::HandleForegroundEventL %d"), aForeground );
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
     if ( aForeground )
         {
-        CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
         // if foreground event is received while in videocall, go to standby with error
         if ( iController.InVideocallOrRinging() && ECamNoOperation == iController.CurrentOperation() )
             {
@@ -286,7 +286,7 @@
             }
         }        
     // To background
-    else
+    else if( !aForeground && appUi->AppInBackground( EFalse ) )
         {
         PRINT( _L("Camera <> CCamUserSceneSetupViewBase::HandleForegroundEventL dec engine count") );
         // Register that we nolonger need the engine
@@ -531,14 +531,14 @@
     {
     PRINT( _L("Camera => CCamUserSceneSetupViewBase::SwitchToCaptureSetupModeL()") );  	   	
     iUserSceneSetupModeActive = EFalse;
+    SetCaptureSetupModeActive(ETrue);
     iContainer->MakeVisible( ETrue );  
     AppUi()->RemoveFromStack( iContainer );
     iVFRequested=ETrue;    
     StartViewFinder();
     iController.StartIdleTimer();
 
-    SetCaptureSetupModeActive(ETrue);
-
+    
     // Remove the view's main container, and add the capture setup 
     // control associated with the input command to the container stack.
     CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( aSetupCommand, ETrue );
--- a/camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -269,7 +269,7 @@
     iAiwServiceHandler->Reset();
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ),
             R_CAM_SHARE_ON_OVI_INTEREST );
-    
+
     // SHARE_AIW
     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID),
                                      R_CAM_AIW_VIEW_INTEREST );
@@ -341,10 +341,6 @@
     BaseConstructL( ROID(R_CAM_VIDEO_POST_CAPTURE_VIEW_ID));
     CCamPostCaptureViewBase::ConstructL();
 
-    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), R_CAM_SHARE_ON_OVI_INTEREST );
-    // SHARE_AIW
-    iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_AIW_VIEW_INTEREST );
-
     PRINT( _L("Camera <= CCamVideoPostCaptureView::ConstructL"))
     }
 
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp	Tue Apr 27 16:19:06 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"
@@ -1191,14 +1191,33 @@
             {            
             if ( iEmbedded /* && appUi->IsSecondCameraEnabled()*/ )
                 {
+                // Dim mode switch icon and disable tooltip
                 aToolbar->SetItemDimmed(ECamCmdNewPhoto, ETrue, ETrue);
+                CAknButton* imageModeButton = static_cast<CAknButton*>(
+					          aToolbar->ControlOrNull( ECamCmdNewPhoto ) );
+                if ( imageModeButton ) 
+                    {
+                    imageModeButton->SetDimmedHelpTextL( KNullDesC );
+ 					}
+                
+                if ( appUi && appUi->IsSecondCameraEnabled() )
+                    {
+                    aToolbar->SetItemDimmed( ECamCmdPhotos, ETrue, ETrue );
+                    CAknButton* photosButton = static_cast<CAknButton*>(
+                        aToolbar->ControlOrNull( ECamCmdPhotos ) );
+                    if ( photosButton ) 
+                        {
+                        // do not show tooltip for dimmed item
+                        photosButton->SetDimmedHelpTextL( KNullDesC );
+                        }
+                    }
                 }
             CAknToolbarExtension* extension = aToolbar->ToolbarExtension();
             if( extension )
                 {
                 if ( iEmbedded )
                     {
-					extension->HideItemL( ECamCmdNewPhoto, ETrue );
+                    extension->HideItemL( ECamCmdNewPhoto, ETrue );
                     extension->HideItemL( ECamCmdPhotos, ETrue );
                     }
                 else
--- a/camerauis/cameraapp/generic/src/CamViewBase.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamViewBase.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -400,6 +400,10 @@
     else
         {
         SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CONTINUE );
+        if( Cba() && !appUi->IsRecoverableStatus() )
+            {
+            Cba()->MakeCommandVisible( ECamCmdExitStandby, EFalse );
+            }
         }
 
     // change options menu
@@ -410,7 +414,7 @@
         }
 
 //    if ( iStandbyError != KErrNone )
-    if ( appUi->StandbyStatus() != KErrNone )
+    if ( appUi->StandbyStatus() != KErrNone && appUi->IsRecoverableStatus())
         {
         // stop idle timer - non recoverable error
         iController.StopIdleTimer();
@@ -1040,4 +1044,40 @@
     iCommandHandlerAo->HandleCommandL( aCommand );
     }    
 
+// -----------------------------------------------------------------------------
+// CCamViewBase::SetStandbyStatusL
+// -----------------------------------------------------------------------------    
+ 
+void CCamViewBase::SetStandbyStatusL( TInt aError )
+    {
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
+    __ASSERT_DEBUG( appUi, CamPanic( ECamPanicNullPointer ) );
+    if( iStandbyModeActive )
+        {
+        appUi->SetStandbyStatus( aError );
+        iStandbyContainer->SetStandbyErrorL( aError );
+        if ( aError == KErrInUse ||
+             aError == KErrPermissionDenied ||
+             aError == KErrAccessDenied )
+            {
+            SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );    
+            }   
+        else if ( iEmbedded )
+            {
+            SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_BACK__CONTINUE );
+            }
+        else
+            {
+            SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CONTINUE );
+            if( Cba() && !appUi->IsRecoverableStatus() )
+                {
+                Cba()->MakeCommandVisible( ECamCmdExitStandby, EFalse );
+                }
+            else
+                {
+                Cba()->MakeCommandVisible( ECamCmdExitStandby, ETrue );
+                }
+            }
+        }
+    }
 //  End of File  
--- a/camerauis/cameraapp/generic/src/audioplayer/camaudioplayercontroller.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/audioplayer/camaudioplayercontroller.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -33,7 +33,6 @@
 #include "mcamplayerobserver.h"
 #include "mcamplayerwrapper.h"
 #include "camaudioplayerwrapper.h"
-#include "camtoneplayerwrapper.h"
 #include "camaudioplayercontroller.h"
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
@@ -256,35 +255,6 @@
 
 
 // ---------------------------------------------------------------------------
-// PlayTone
-// ---------------------------------------------------------------------------
-// 
-void
-CCamAudioPlayerController::PlayTone( TInt    aToneInHz, 
-                                     TInt    aLengthInUs, 
-                                     TReal32 aVolumeInPercent, 
-                                     TBool   aCallback )
-  {
-  TInt status( KErrNone );
-
-  if( !iTonePlayer )
-    {
-    TRAP( status, iTonePlayer = CCamTonePlayerWrapper::NewL( iObserver ) );
-    }
-
-  if( KErrNone == status )
-    {
-    iTonePlayer->PlayTone( aToneInHz, aLengthInUs, aVolumeInPercent, aCallback );
-    }
-  else
-    {
-    if( aCallback )
-      iObserver.PlayComplete( status, -1 );
-    }
-  }
-  
-
-// ---------------------------------------------------------------------------
 // CancelAllPlaying
 // ---------------------------------------------------------------------------
 //
@@ -293,10 +263,6 @@
   {
   PRINT( _L("Camera => CCamAudioPlayerController::CancelAllPlaying") );
 
-  if( iTonePlayer )
-    {
-    iTonePlayer->CancelPlay();
-    }
   for( TInt i = 0; i < iPlayers.Count(); i++ )
     {
     iPlayers[i]->CancelPlay();
@@ -587,8 +553,6 @@
   PRINT ( _L("Camera => CCamAudioPlayerController::Reset") );
   iPlayers.ResetAndDestroy();
 
-  delete iTonePlayer;
-  iTonePlayer = NULL;
 
   iCameraMode     = ECamControllerIdle;
   iCaptureSoundId = -1;
--- a/camerauis/cameraapp/generic/src/audioplayer/camaudioplayerwrapper.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/audioplayer/camaudioplayerwrapper.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -275,8 +275,7 @@
     case ECamBurstCaptureSoundId3: filename.Set( KCamBurstCaptureTone3 );      break;
     case ECamBurstCaptureSoundId4: filename.Set( KCamBurstCaptureTone4 );      break;
     
-    case ECamSelfTimerSoundId:     User::Leave( KErrNotSupported );       break;
-    case ECamInCallToneId:         User::Leave( KErrNotSupported );       break;
+    case ECamSelfTimerSoundId:     filename.Set( KCamSelfTimerTone );      break;
 
     default:
       __ASSERT_DEBUG( EFalse, CamPanic( ECamPanicNotSupported ) );
--- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -856,6 +856,10 @@
   HandleVideoEvent( ECamCameraEventVideoInit, aError );
   // DelayCallback( ECamCameraEventVideoInit, aError, 500000 );
 #else
+  if( aError == KErrWrite )
+      {
+      aError = KErrNone;
+      }
   if( aError &&
       ( iIveCancel || ( !iIveSequenceActive && iIveRecoveryOngoing ) ) )
       // Return if error and recovering process has been started,
@@ -994,6 +998,10 @@
 #ifdef CAMERAAPP_CAE_ERR_SIMULATION
   HandleVideoEvent( ECamCameraEventVideoStop, KErrUnknown );
 #else
+  if( aError == KErrWrite )
+      {
+      aError = KErrNone;
+      }
   HandleVideoEvent( ECamCameraEventVideoStop, aError );
 #endif // CAMERAAPP_CAE_ERR_SIMULATION
   // Change stopping mode back to default sync mode
@@ -2890,7 +2898,7 @@
                   params().iRect );
               (void) SetVfWindowOrdinal( orgPos ); // back to original
 
-              if ( ECamActiveCameraSecondary == appUi->ActiveCamera() )
+              if ( appUi && ECamActiveCameraSecondary == appUi->ActiveCamera() )
                   {
                   iCamera->SetViewFinderMirrorL(ETrue);
                   }
@@ -2959,7 +2967,10 @@
 
         iInfo.iVfState = ECamTriActive;
         //view finder started now(set stop status as false)
-        appUi->SetViewFinderStoppedStatus( EFalse );
+        if ( appUi )
+            {
+            appUi->SetViewFinderStoppedStatus( EFalse );
+            }
         break;
         }
       // -----------------------------------------------------
@@ -4228,7 +4239,7 @@
        iIveRecoveryCount &&                   // Give up eventually
        !appUi->AppInBackground( EFalse ) &&   // Only if on the foreground
        ( !iReleasedByUi ||             // Try recover if unknown reason
-         appUi->StandbyStatus() ) &&    // or known error
+         ( appUi->StandbyStatus() && appUi->IsRecoverableStatus() ) ) &&    // or known error 
          !iAppController.InVideocallOrRinging() && // Video telephony parallel use case
          !iIveRecoveryOngoing        //  processing recovery sequence
          )
@@ -6644,7 +6655,7 @@
             return;
             }
 		__ASSERT_DEBUG(view, CamPanic(ECamPanicNullPointer));
-        if ( appUi->StandbyStatus() && view->IsInStandbyMode() )
+        if ( appUi->StandbyStatus() && appUi->IsRecoverableStatus() && view->IsInStandbyMode() ) 
             {
             PRINT( _L("Camera <> CCamCameraController::DoIveRecovery - Standby mode active, try to exit") )
             TRAP_IGNORE( appUi->HandleControllerEventL(  ECamEventCameraChanged,
@@ -6699,9 +6710,13 @@
       TBool ftOn( EFalse );
       iSettingProvider.ProvideCameraSettingL( ECameraSettingFacetracking, &ftOn );
       PRINT1( _L("Camera <> Set facetracking: %d"), ftOn )
-      iCustomInterfaceFaceTracking->SetFaceTrackingL( ftOn );
-      iCustomInterfaceFaceTracking->EnableFaceIndicatorsL( ETrue );
-      DirectRequestL( ECamRequestSetAfRange );
+      if( ( ftOn && !iCustomInterfaceFaceTracking->FaceTrackingOn() ) ||
+          ( !ftOn && iCustomInterfaceFaceTracking->FaceTrackingOn() ) )
+          {
+          iCustomInterfaceFaceTracking->SetFaceTrackingL( ftOn );
+          iCustomInterfaceFaceTracking->EnableFaceIndicatorsL( ETrue );
+          DirectRequestL( ECamRequestSetAfRange );
+          }
       }
     }
 
--- a/camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camimagedecoder.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -319,7 +319,7 @@
       // CImageDecoder has finished using the data,
       // so we are able to free it.
       SetImageData( NULL );
-      iObserver.ImageDecoded( iStatus.Int(), iDecodedBitmap, iDecodedMask );
+      iObserver.ImageDecodedL( iStatus.Int(), iDecodedBitmap, iDecodedMask );
       break;
       }
     case KErrUnderflow :
@@ -364,7 +364,7 @@
   SetImageData( NULL );
   // Leave has occurred in RunL.
   // Notify observer with error.
-  iObserver.ImageDecoded( aError, NULL, NULL );
+  TRAP_IGNORE(iObserver.ImageDecodedL( aError, NULL, NULL ));
 
   PRINT( _L("Camera <= CCamImageDecoder::RunError") );
   return KErrNone;
--- a/camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camsnapshot.cpp	Tue Apr 27 16:19:06 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"
@@ -435,11 +435,11 @@
 // from MCamImageDecoderObserver
 
 // ---------------------------------------------------------------------------
-// ImageDecoded <<virtual>>
+// ImageDecodedL <<virtual>>
 // ---------------------------------------------------------------------------
 //
 void 
-CCamSnapshot::ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* /*aMask*/ )
+CCamSnapshot::ImageDecodedL( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* /*aMask*/ )
   {
   PRINT1( _L("Camera => CCamSnapshot::ImageDecoded, status in: %d"), aStatus );
   if( iSnapshotOn )
@@ -590,7 +590,7 @@
     CFbsBitmap& bitmap = buffer->BitmapL( 0 );
     PRINT( _L("Camera <> Using bitmap data, just scale..") );
     // Simulate that the bitmap has been decoded now.
-    ImageDecoded( aError, &bitmap, NULL );
+    ImageDecodedL( aError, &bitmap, NULL );
     });
 
   // If problems with bitmap data, try encoded data.
--- a/camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/camoneclickuploadutility.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-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"
@@ -40,6 +40,7 @@
 const TVersion KShareOnlineMinimumVersion( 5, 0, 0 );
 const TUid KOpenModeOneClick = { 2 };
 const TUid KCmdGetOneClickToolTip = { 15 };
+const TUid KOpenModeShareSettings  = { 11 };
 
 const TUint32 KShareImageServiceIconFileName = 0x00000002;
 const TUint32 KShareVideoServiceIconFileName = 0x00000003;
@@ -87,6 +88,7 @@
         {
         CheckVersionL();
         InitializeAiwL();
+        ButtonTooltipL();
         iUploadSupported = ETrue;
         } );
 #else
@@ -183,6 +185,11 @@
     {
     __ASSERT_ALWAYS( iAiwServiceHandler, CamPanic( ECamPanicNullPointer ) );
 
+    if ( iTooltip )
+        {
+        return *iTooltip;
+        }
+
     CAiwGenericParamList& paramList = iAiwServiceHandler->InParamListL();
     paramList.Reset();
 
@@ -212,6 +219,25 @@
     return *iTooltip;
     }
 
+// ---------------------------------------------------------------------------
+// Launch Share settings view
+// ---------------------------------------------------------------------------
+//
+void CCamOneClickUploadUtility::LaunchShareSettings()
+    {
+    PRINT( _L("Camera => CCamOneClickUploadUtility::LaunchShareSettings") );
+    
+    CAiwGenericParamList& paramList = iAiwServiceHandler->InParamListL();
+    paramList.Reset();
+    
+    TAiwVariant openVariant( KOpenModeShareSettings );
+    TAiwGenericParam openParam( EGenericParamModeActivation, openVariant );
+    paramList.AppendL( openParam );
+    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdView, 
+            paramList, iAiwServiceHandler->OutParamListL() );
+    
+    PRINT( _L("Camera <= CCamOneClickUploadUtility::LaunchShareSettings") );
+    }
 
 // ---------------------------------------------------------------------------
 // Check Share Online version
@@ -289,6 +315,8 @@
 
     iAiwServiceHandler = CAiwServiceHandler::NewL();
     iAiwServiceHandler->AttachL( R_CAM_ONE_CLICK_UPLOAD_INTEREST );
+    iAiwServiceHandler->AttachL( R_CAM_AIW_VIEW_INTEREST );
+    PRINT( _L("Camera <> CCamOneClickUploadUtility::InitializeAiwL - initialized") );
     }
 
 // ---------------------------------------------------------------------------
@@ -297,7 +325,7 @@
 //
 void CCamOneClickUploadUtility::CurrentIconPathL( TCamCameraMode aMode, TDes& aPath )
     {
-    PRINT( _L("Camera => CCamOneClickUploadUtility::CurrentIconPathL") );
+    PRINT1( _L("Camera => CCamOneClickUploadUtility::CurrentIconPathL mode:%d"), aMode );
     TUint32 serviceIconId = KShareCommonServiceIconFileName;
 
     if ( ECamControllerVideo == aMode )
@@ -316,13 +344,13 @@
     }
 
 // -----------------------------------------------------------------------------
-// CCamOneClickUploadUtility::UpdateUploadIcon
+// CCamOneClickUploadUtility::UpdateUploadIconL
 // -----------------------------------------------------------------------------
 //
-void CCamOneClickUploadUtility::UpdateUploadIcon( CAknToolbar *aToolbar, 
+void CCamOneClickUploadUtility::UpdateUploadIconL( CAknToolbar *aToolbar,
                                                   TCamCameraMode aMode )
     {
-    PRINT( _L("Camera => CCamOneClickUploadUtility::UpdateUploadIcon") );
+    PRINT( _L("Camera => CCamOneClickUploadUtility::UpdateUploadIconL") );
 
     TFileName currIcon;
     CurrentIconPathL( aMode, currIcon );
@@ -346,17 +374,20 @@
             PRINT( _L("Camera <> Copying icon") );
             CAknButton* button = dynamic_cast<CAknButton*>(
                 aToolbar->ControlOrNull( ECamCmdOneClickUpload ) );
-            CAknButtonState* state = button->State();
+            if ( button )
+                {
+                CAknButtonState* state = button->State();
 
-            CGulIcon *icon = CGulIcon::NewL( iIconImage, iIconMask );
-            state->SetIcon( icon );
-            icon->SetBitmapsOwnedExternally( ETrue );
+                CGulIcon *icon = CGulIcon::NewL( iIconImage, iIconMask );
+                state->SetIcon( icon );
+                icon->SetBitmapsOwnedExternally( ETrue );
 
-            button->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
-            aToolbar->DrawNow();
+                button->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
+                aToolbar->DrawNow();
+                }
             }
         }
-    PRINT( _L("Camera <= CCamOneClickUploadUtility::UpdateUploadIcon") );
+    PRINT( _L("Camera <= CCamOneClickUploadUtility::UpdateUploadIconL") );
     }
 
 // -----------------------------------------------------------------------------
@@ -380,12 +411,12 @@
     }
 
 // ---------------------------------------------------------------------------
-// Image decoding complete notification
+// Image decoding complete notificationL
 // ---------------------------------------------------------------------------
 //
-void CCamOneClickUploadUtility::ImageDecoded( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask )
+void CCamOneClickUploadUtility::ImageDecodedL( TInt aStatus, const CFbsBitmap* aBitmap, const CFbsBitmap* aMask )
     {
-    PRINT( _L("Camera => CCamOneClickUploadUtility::ImageDecoded") );
+    PRINT( _L("Camera => CCamOneClickUploadUtility::ImageDecodedL") );
 
     if ( aStatus == KErrNone )
         {
@@ -409,13 +440,30 @@
             
             CAknButton* uploadButton =
                         static_cast<CAknButton*> (iToolbar->ControlOrNull(ECamCmdOneClickUpload));
-            CAknButtonState* currentState = uploadButton->State();
-
-            CGulIcon *icon =  CGulIcon::NewL( iIconImage, iIconMask );
+            
+            CAknButtonState* currentState(NULL);
+            if ( uploadButton )
+                {
+                currentState = uploadButton->State();
+                }
+            CGulIcon *icon(NULL);
+            if ( iIconMask )
+                {
+                icon =  CGulIcon::NewL( iIconImage, iIconMask );
+                }
+            else
+                {
+                icon =  CGulIcon::NewL( iIconImage ); //Prevent freed pointer warning
+                }
             icon->SetBitmapsOwnedExternally( ETrue );
-            currentState->SetIcon( icon );
-
-            uploadButton->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
+            if ( currentState )
+                {
+                currentState->SetIcon( icon );
+                }
+            if ( uploadButton )
+                {
+                uploadButton->SetButtonFlags( KAknButtonNoFrame | KAknButtonPressedDownFrame );
+                }
             iToolbar->DrawNow();
             }
         }
--- a/camerauis/cameraapp/generic/src/camvideotime.cpp	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/src/camvideotime.cpp	Tue Apr 27 16:19:06 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-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"
@@ -33,7 +33,7 @@
                               TInt64 aCriticalLimit,             
                               TInt   aVideoBitRate,
                               TInt   aAudioBitRate,
-                              TUint  aSizeLimit,
+                              TInt64 aSizeLimit,
                               TBool  aMuteAudio,
                               TReal  aBitrateScaler )
     {
--- a/camerauis/cameraapp/rom/cameraapp.iby	Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/rom/cameraapp.iby	Tue Apr 27 16:19:06 2010 +0300
@@ -42,6 +42,7 @@
 data = ABI_DIR\BUILD_DIR\z\system\sounds\Digital\cameraappCaptureShort2.wav    system\sounds\Digital\cameraappCaptureShort2.wav
 data = ABI_DIR\BUILD_DIR\z\system\sounds\Digital\cameraappCaptureShort3.wav    system\sounds\Digital\cameraappCaptureShort3.wav
 data = ABI_DIR\BUILD_DIR\z\system\sounds\Digital\cameraappCaptureShort4.wav    system\sounds\Digital\cameraappCaptureShort4.wav
+data = ABI_DIR\BUILD_DIR\z\system\sounds\Digital\cameraappSelfTimer.wav    system\sounds\Digital\cameraappSelfTimer.wav
 
 // Backup registration
 data = ZPRIVATE\101FFA86\backup_registration.xml                          private\101FFA86\backup_registration.xml