camerauis/cameraapp/generic/src/CamAppController.cpp
branchRCL_3
changeset 22 f54ad444594d
parent 21 289bbfdb6627
equal deleted inserted replaced
21:289bbfdb6627 22:f54ad444594d
  2561       UiConfigManagerPtr()->SupportedScreenModesL( screenModeValues );
  2561       UiConfigManagerPtr()->SupportedScreenModesL( screenModeValues );
  2562       TInt landscapeScreenMode = screenModeValues[0];
  2562       TInt landscapeScreenMode = screenModeValues[0];
  2563       SetCameraOrientationModeL( landscapeScreenMode );
  2563       SetCameraOrientationModeL( landscapeScreenMode );
  2564       }
  2564       }
  2565   iCameraController->CompleteSwitchCameraL();
  2565   iCameraController->CompleteSwitchCameraL();
       
  2566   // Force to get a sensor data after switch camera from primary to secondary 
       
  2567   // when always holding in camera with portrait mode. 
       
  2568   if( iConfigManager 
       
  2569       && iConfigManager->IsOrientationSensorSupported() )
       
  2570     {
       
  2571     if( iAccSensorListening )
       
  2572       {
       
  2573       iAccSensorListening = EFalse;
       
  2574       }
       
  2575     if( iAccSensorChannel )
       
  2576       {
       
  2577       delete iAccSensorChannel;
       
  2578       iAccSensorChannel = NULL;
       
  2579       }        
       
  2580     TRAP_IGNORE( UpdateSensorApiL( ETrue ) );            
       
  2581     }
  2566 
  2582 
  2567   // Camera switched.
  2583   // Camera switched.
  2568   // a) Set current camera index to the new one.
  2584   // a) Set current camera index to the new one.
  2569   // b) Set target mode (video/image) to the one before mode switch.
  2585   // b) Set target mode (video/image) to the one before mode switch.
  2570   // c) Image mode is single shot after camera switch
  2586   // c) Image mode is single shot after camera switch
  3993 // Returns true if AppUi has been constructed, and not yet destructed
  4009 // Returns true if AppUi has been constructed, and not yet destructed
  3994 // ---------------------------------------------------------------------------
  4010 // ---------------------------------------------------------------------------
  3995 //
  4011 //
  3996 TBool CCamAppController::IsAppUiAvailable() const
  4012 TBool CCamAppController::IsAppUiAvailable() const
  3997     {
  4013     {
       
  4014     PRINT1(_L("Camera <> CCamAppController::IsAppUiAvailable=%d"),iAppUiAvailable);
  3998     return iAppUiAvailable;
  4015     return iAppUiAvailable;
  3999     }       
  4016     }       
  4000     
  4017     
  4001 // ---------------------------------------------------------------------------
  4018 // ---------------------------------------------------------------------------
  4002 // CCamAppController::SetAppUiAvailable
  4019 // CCamAppController::SetAppUiAvailable
  8752 void CCamAppController::StartLocationTrailL()
  8769 void CCamAppController::StartLocationTrailL()
  8753   {
  8770   {
  8754   PRINT( _L("Camera => CCamAppController::StartLocationTrailL") );
  8771   PRINT( _L("Camera => CCamAppController::StartLocationTrailL") );
  8755   CCamAppUi* appUI = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
  8772   CCamAppUi* appUI = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
  8756 
  8773 
       
  8774   if( !iRepository )
       
  8775     {
       
  8776     iRepository = CRepository::NewL( KCRUidCameraappSettings ); 
       
  8777     }
       
  8778 
       
  8779     TInt ftuValue=-1;
       
  8780     TInt retErr=0;
       
  8781     retErr = iRepository->Get( KCamCrFtuMessageFlag, ftuValue );
       
  8782 	if( ftuValue == 0 )
       
  8783 		{
       
  8784 		return;
       
  8785 		}
       
  8786 
       
  8787 	if( iRepository )
       
  8788 		{
       
  8789 		delete  iRepository;
       
  8790 		iRepository = NULL;
       
  8791 		}
       
  8792 
       
  8793 
  8757   // If a stop request is pending but the trail is being restarted, stop 
  8794   // If a stop request is pending but the trail is being restarted, stop 
  8758   // and delete the timer
  8795   // and delete the timer
  8759   if( iLocationTrailTimer )
  8796   if( iLocationTrailTimer )
  8760   	{
  8797   	{
  8761   	iLocationTrailTimer->Cancel();
  8798   	iLocationTrailTimer->Cancel();