camerauis/cameraapp/generic/src/CamAppController.cpp
branchRCL_3
changeset 50 f54ad444594d
parent 49 289bbfdb6627
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp	Thu Jul 15 18:18:07 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp	Thu Aug 19 09:36:57 2010 +0300
@@ -2563,6 +2563,22 @@
       SetCameraOrientationModeL( landscapeScreenMode );
       }
   iCameraController->CompleteSwitchCameraL();
+  // Force to get a sensor data after switch camera from primary to secondary 
+  // when always holding in camera with portrait mode. 
+  if( iConfigManager 
+      && iConfigManager->IsOrientationSensorSupported() )
+    {
+    if( iAccSensorListening )
+      {
+      iAccSensorListening = EFalse;
+      }
+    if( iAccSensorChannel )
+      {
+      delete iAccSensorChannel;
+      iAccSensorChannel = NULL;
+      }        
+    TRAP_IGNORE( UpdateSensorApiL( ETrue ) );            
+    }
 
   // Camera switched.
   // a) Set current camera index to the new one.
@@ -3995,6 +4011,7 @@
 //
 TBool CCamAppController::IsAppUiAvailable() const
     {
+    PRINT1(_L("Camera <> CCamAppController::IsAppUiAvailable=%d"),iAppUiAvailable);
     return iAppUiAvailable;
     }       
     
@@ -8754,6 +8771,26 @@
   PRINT( _L("Camera => CCamAppController::StartLocationTrailL") );
   CCamAppUi* appUI = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
 
+  if( !iRepository )
+    {
+    iRepository = CRepository::NewL( KCRUidCameraappSettings ); 
+    }
+
+    TInt ftuValue=-1;
+    TInt retErr=0;
+    retErr = iRepository->Get( KCamCrFtuMessageFlag, ftuValue );
+	if( ftuValue == 0 )
+		{
+		return;
+		}
+
+	if( iRepository )
+		{
+		delete  iRepository;
+		iRepository = NULL;
+		}
+
+
   // If a stop request is pending but the trail is being restarted, stop 
   // and delete the timer
   if( iLocationTrailTimer )