649 { |
652 { |
650 iUiConstructionComplete = ETrue; |
653 iUiConstructionComplete = ETrue; |
651 } |
654 } |
652 iMemoryMonitor->StartMonitoring( iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained(), |
655 iMemoryMonitor->StartMonitoring( iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained(), |
653 iController.UiConfigManagerPtr()->RequiredRamMemoryFocusGained() ); |
656 iController.UiConfigManagerPtr()->RequiredRamMemoryFocusGained() ); |
|
657 |
|
658 // TRAP errors so camera starts up even if startup animation fails |
|
659 TRAP_IGNORE(iStartupLogoController = CCamStartupLogoController::NewL(EStartupLogoVisible)); |
|
660 |
654 PRINT( _L("Camera <= CCamAppUi::ConstructL") ) |
661 PRINT( _L("Camera <= CCamAppUi::ConstructL") ) |
655 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP3_CCAMAPPUI_CONSTRUCTL, "e_CCamAppUi_ConstructL 0" ); |
662 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP3_CCAMAPPUI_CONSTRUCTL, "e_CCamAppUi_ConstructL 0" ); |
656 } |
663 } |
657 |
664 |
658 |
665 |
1799 iResourceLoaders[rl]->ReloadResourceDataL(); |
1806 iResourceLoaders[rl]->ReloadResourceDataL(); |
1800 } |
1807 } |
1801 |
1808 |
1802 iCamSidePane->UpdateLayout(); |
1809 iCamSidePane->UpdateLayout(); |
1803 iTargetViewState = ECamViewStatePreCapture; |
1810 iTargetViewState = ECamViewStatePreCapture; |
1804 delete iScreenClearer; |
|
1805 iScreenClearer = NULL; |
|
1806 iScreenClearer = CAknLocalScreenClearer::NewL( |
|
1807 IsSecondCameraEnabled() || IsQwerty2ndCamera() ); |
|
1808 TrySwitchViewL( ETrue ); |
1811 TrySwitchViewL( ETrue ); |
1809 iController.SwitchCameraL(); |
1812 iController.SwitchCameraL(); |
1810 } |
1813 } |
1811 } |
1814 } |
1812 } |
1815 } |
2644 !AppInBackground( EFalse ) ) |
2647 !AppInBackground( EFalse ) ) |
2645 { |
2648 { |
2646 if( ECamViewStateStandby != iViewState ) |
2649 if( ECamViewStateStandby != iViewState ) |
2647 { |
2650 { |
2648 DismissMemoryNoteL(); |
2651 DismissMemoryNoteL(); |
2649 |
2652 |
|
2653 if (iStartupLogoController) |
|
2654 { |
|
2655 iStartupLogoController->HideLogo(); |
|
2656 } |
|
2657 |
2650 if( IsInternalView( iViewState ) ) |
2658 if( IsInternalView( iViewState ) ) |
2651 { |
2659 { |
2652 |
2660 |
2653 if ( aStatus != KErrInUse && |
2661 if ( aStatus != KErrInUse && |
2654 iPreCaptureMode == ECamPreCapCaptureSetup || |
2662 iPreCaptureMode == ECamPreCapCaptureSetup || |
2937 // relinquish capture keys |
2948 // relinquish capture keys |
2938 UnRegisterCaptureKeys(); |
2949 UnRegisterCaptureKeys(); |
2939 } |
2950 } |
2940 #endif |
2951 #endif |
2941 } |
2952 } |
2942 |
2953 |
|
2954 if (iStartupLogoController) |
|
2955 { |
|
2956 iStartupLogoController->HideLogo(); |
|
2957 } |
|
2958 |
2943 if( AppInBackground(EFalse) || ( !CamUtility::IsBatteryPowerOK() && |
2959 if( AppInBackground(EFalse) || ( !CamUtility::IsBatteryPowerOK() && |
2944 !CamUtility::IsBatteryCharging() ) ) |
2960 !CamUtility::IsBatteryCharging() ) ) |
2945 { |
2961 { |
2946 if( ECamControllerVideo == iMode ) |
2962 if( ECamControllerVideo == iMode ) |
2947 { |
2963 { |
4367 { |
4387 { |
4368 currentLocation = static_cast<TCamMediaStorage>( |
4388 currentLocation = static_cast<TCamMediaStorage>( |
4369 iController.IntegerSettingValue( key ) ); |
4389 iController.IntegerSettingValue( key ) ); |
4370 } |
4390 } |
4371 if(currentLocation != ECamMediaStoragePhone && |
4391 if(currentLocation != ECamMediaStoragePhone && |
4372 !IsMemoryFullOrUnavailable(ECamMediaStoragePhone)) |
4392 !IsMemoryFullOrUnavailable(ECamMediaStoragePhone) && |
4373 { |
4393 !iController.IntegerSettingValue( ECamSettingItemRemovePhoneMemoryUsage ) ) |
4374 supportedMemTypes |= |
4394 { |
4375 AknCommonDialogsDynMem::EMemoryTypePhone; |
4395 supportedMemTypes |= AknCommonDialogsDynMem::EMemoryTypePhone; |
4376 } |
4396 } |
4377 if(currentLocation != ECamMediaStorageCard && |
4397 if(currentLocation != ECamMediaStorageCard && |
4378 !IsMemoryFullOrUnavailable(ECamMediaStorageCard)) |
4398 !IsMemoryFullOrUnavailable(ECamMediaStorageCard)) |
4379 { |
4399 { |
4380 supportedMemTypes |= |
4400 supportedMemTypes |= AknCommonDialogsDynMem::EMemoryTypeMMCExternal; |
4381 AknCommonDialogsDynMem::EMemoryTypeMMCExternal; |
4401 } |
4382 } |
4402 if(currentLocation != ECamMediaStorageMassStorage && |
4383 if(currentLocation != ECamMediaStorageMassStorage && |
4403 !IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage)) |
4384 !IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage)) |
4404 { |
4385 { |
|
4386 supportedMemTypes |= |
4405 supportedMemTypes |= |
4387 AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; |
4406 AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage; |
4388 } |
4407 } |
4389 |
4408 |
4390 CAknMemorySelectionDialogMultiDrive* memoryDialog = |
4409 CAknMemorySelectionDialogMultiDrive* memoryDialog = |
5310 { |
5329 { |
5311 iController.StopViewFinder(); |
5330 iController.StopViewFinder(); |
5312 iViewFinderStopped = ETrue; |
5331 iViewFinderStopped = ETrue; |
5313 } |
5332 } |
5314 |
5333 |
|
5334 if ( iStartupLogoController ) |
|
5335 { |
|
5336 iStartupLogoController->ShowLogo(); |
|
5337 } |
|
5338 |
5315 PRINT( _L("Camera <= CCamAppUi::InternalExitL") ); |
5339 PRINT( _L("Camera <= CCamAppUi::InternalExitL") ); |
5316 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_INTERNALEXITL, "e_CCamAppUi_InternalExitL 0" ); |
5340 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_INTERNALEXITL, "e_CCamAppUi_InternalExitL 0" ); |
5317 |
5341 |
5318 } |
5342 } |
5319 |
5343 |
8313 // CCamAppUi::AllMemoriesFullOrUnavailable |
8337 // CCamAppUi::AllMemoriesFullOrUnavailable |
8314 // ----------------------------------------------------------------------------- |
8338 // ----------------------------------------------------------------------------- |
8315 // |
8339 // |
8316 TBool CCamAppUi::AllMemoriesFullOrUnavailable() const |
8340 TBool CCamAppUi::AllMemoriesFullOrUnavailable() const |
8317 { |
8341 { |
8318 return ( IsMemoryFullOrUnavailable(ECamMediaStoragePhone) && |
8342 TBool phoneMemoryUnavailable = iController.IntegerSettingValue(ECamSettingItemRemovePhoneMemoryUsage)? |
|
8343 ETrue: |
|
8344 IsMemoryFullOrUnavailable(ECamMediaStoragePhone); |
|
8345 return ( phoneMemoryUnavailable && |
8319 IsMemoryFullOrUnavailable(ECamMediaStorageCard) && |
8346 IsMemoryFullOrUnavailable(ECamMediaStorageCard) && |
8320 IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage) ); |
8347 IsMemoryFullOrUnavailable(ECamMediaStorageMassStorage) ); |
8321 } |
8348 } |
8322 |
8349 |
8323 |
8350 |
8474 // ----------------------------------------------------------------------------- |
8501 // ----------------------------------------------------------------------------- |
8475 // |
8502 // |
8476 void CCamAppUi::SetViewFinderStoppedStatus( TBool aViewFinderStopped ) |
8503 void CCamAppUi::SetViewFinderStoppedStatus( TBool aViewFinderStopped ) |
8477 { |
8504 { |
8478 iViewFinderStopped = aViewFinderStopped; |
8505 iViewFinderStopped = aViewFinderStopped; |
|
8506 |
|
8507 if (iStartupLogoController) |
|
8508 { |
|
8509 iStartupLogoController->HideLogo(); |
|
8510 } |
8479 } |
8511 } |
8480 |
8512 |
8481 // ----------------------------------------------------------------------------- |
8513 // ----------------------------------------------------------------------------- |
8482 // CCamAppUi::IsViewFinderInTransit |
8514 // CCamAppUi::IsViewFinderInTransit |
8483 // ----------------------------------------------------------------------------- |
8515 // ----------------------------------------------------------------------------- |
8498 |
8530 |
8499 // ----------------------------------------------------------------------------- |
8531 // ----------------------------------------------------------------------------- |
8500 // CCamAppUi::CheckMemoryAvailableForCapturing |
8532 // CCamAppUi::CheckMemoryAvailableForCapturing |
8501 // ----------------------------------------------------------------------------- |
8533 // ----------------------------------------------------------------------------- |
8502 // |
8534 // |
8503 void |
8535 void CCamAppUi::CheckMemoryAvailableForCapturing() |
8504 CCamAppUi::CheckMemoryAvailableForCapturing() |
8536 { |
8505 { |
|
8506 PRINT( _L("Camera => CCamAppUi::CheckMemoryAvailableForCapturing") ) |
8537 PRINT( _L("Camera => CCamAppUi::CheckMemoryAvailableForCapturing") ) |
8507 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMAPPUI_CHECKMEMORYAVAILABLEFORCAPTURING, "e_CCamAppUi_CheckMemoryAvailableForCapturing 1" ); |
8538 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMAPPUI_CHECKMEMORYAVAILABLEFORCAPTURING, "e_CCamAppUi_CheckMemoryAvailableForCapturing 1" ); |
8508 if ( ( ECamControllerVideo == iController.CurrentMode() || |
8539 if ( ( ECamControllerVideo == iController.CurrentMode() || |
8509 ECamControllerVideo == iController.TargetMode() ) && |
8540 ECamControllerVideo == iController.TargetMode() ) && |
8510 ECamMediaStorageCard == iController. |
8541 ECamMediaStorageCard == iController. |
8521 } |
8552 } |
8522 |
8553 |
8523 // ----------------------------------------------------------------------------- |
8554 // ----------------------------------------------------------------------------- |
8524 // CCamAppUi::IsMemoryAvailableForCapturing |
8555 // CCamAppUi::IsMemoryAvailableForCapturing |
8525 // ----------------------------------------------------------------------------- |
8556 // ----------------------------------------------------------------------------- |
8526 // |
8557 // |
8527 TBool |
8558 TBool CCamAppUi::IsMemoryAvailableForCapturing() const |
8528 CCamAppUi::IsMemoryAvailableForCapturing() const |
|
8529 { |
8559 { |
8530 return iMemoryAvailableForCapturing; |
8560 return iMemoryAvailableForCapturing; |
8531 } |
8561 } |
8532 |
8562 |
|
8563 // ----------------------------------------------------------------------------- |
|
8564 // CCamAppUi::StartupLogoController |
|
8565 // ----------------------------------------------------------------------------- |
|
8566 // |
|
8567 CCamStartupLogoController* CCamAppUi::StartupLogoController() |
|
8568 { |
|
8569 return iStartupLogoController; |
|
8570 } |
|
8571 |
8533 // End of File |
8572 // End of File |