# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1274780715 -10800 # Node ID f962425b9f8bc21cc6d98eabdafd34d399f17ffc # Parent 4e5b531d23cb5ac77d119086a328623bf2f38cf9 Revision: 201019 Kit: 2010121 diff -r 4e5b531d23cb -r f962425b9f8b voicerec_plat/new_file_service_api/inc/CNewFileServiceBase.h --- a/voicerec_plat/new_file_service_api/inc/CNewFileServiceBase.h Tue May 11 16:15:58 2010 +0300 +++ b/voicerec_plat/new_file_service_api/inc/CNewFileServiceBase.h Tue May 25 12:45:15 2010 +0300 @@ -22,7 +22,7 @@ #define CNEWFILESERVICEBASE_H // INCLUDES -#include +#include #include #include #include diff -r 4e5b531d23cb -r f962425b9f8b voicerec_plat/new_file_service_api/inc/NewFileServiceClient.h --- a/voicerec_plat/new_file_service_api/inc/NewFileServiceClient.h Tue May 11 16:15:58 2010 +0300 +++ b/voicerec_plat/new_file_service_api/inc/NewFileServiceClient.h Tue May 25 12:45:15 2010 +0300 @@ -24,7 +24,7 @@ #include #include #include -#include +#include // FORWARD DECLARATIONS class RFile; diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/AppSrc/CVRAppUI.cpp --- a/voicerecorder/AppSrc/CVRAppUI.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/AppSrc/CVRAppUI.cpp Tue May 25 12:45:15 2010 +0300 @@ -51,7 +51,7 @@ #ifdef RD_MULTIPLE_DRIVE #include #endif -#include +#include _LIT( KVRCommandRecord, "record" ); // --------------------------------------------------------------------------- @@ -227,9 +227,10 @@ // void CVRAppUi::SetDriveL() { - if ( VRUtils::DriveValid( EDriveF ) ) + TInt driveRemovableMassStorage = VRUtils::GetRemovableMassStorageL(); + if ( VRUtils::DriveValid( (TDriveNumber) driveRemovableMassStorage ) ) { - VRUtils::SetMemoDriveL((TDriveNumber)EDriveF ); + VRUtils::SetMemoDriveL( (TDriveNumber) driveRemovableMassStorage ); } else { @@ -239,15 +240,15 @@ Exit(); } - while (!VRUtils::DriveValid(EDriveF)) + while ( !VRUtils::DriveValid( (TDriveNumber) driveRemovableMassStorage ) ) { if (!ShowDialogForWaitStorageCardL()) { Exit(); } } - // Come to here when drive F is valid - VRUtils::SetMemoDriveL((TDriveNumber) EDriveF); + // Come to here when driveRemovableMassStorage is valid + VRUtils::SetMemoDriveL( (TDriveNumber) driveRemovableMassStorage ); } } @@ -448,8 +449,8 @@ { CAknViewAppUi::HandleResourceChangeL( aType ); - if (aType == KEikDynamicLayoutVariantSwitch || aType - == KAknsMessageSkinChange) + if (iLayoutChangeObserver != NULL && (aType == KEikDynamicLayoutVariantSwitch || aType + == KAknsMessageSkinChange)) { iLayoutChangeObserver->LayoutChangedL(aType); } diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/AppSrc/CVRSettingsDialogMMCSupported.cpp --- a/voicerecorder/AppSrc/CVRSettingsDialogMMCSupported.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/AppSrc/CVRSettingsDialogMMCSupported.cpp Tue May 25 12:45:15 2010 +0300 @@ -156,11 +156,12 @@ id++; } + if ( VRUtils::MultipleMassStorageAvailable() ) + { + // Create the memo store item + // Set memo store item's title - // Create the memo store item - // Set memo store item's title - itemTitle = iCoeEnv->AllocReadResourceLC( R_QTN_VOREC_SET_STORE ); - + itemTitle = iCoeEnv->AllocReadResourceLC( R_QTN_VOREC_SET_STORE ); #ifndef RD_MULTIPLE_DRIVE settingItem = new( ELeave ) CAknMemorySelectionSettingItem( 0, iMemoStore ); CleanupStack::PushL( settingItem ); @@ -190,9 +191,8 @@ #endif - - CleanupStack::PopAndDestroy(); // itemTitle - + CleanupStack::PopAndDestroy(); // itemTitle + } CTextListBoxModel* model = listBox->Model(); model->SetItemTextArray( &iSettingItemArray ); // Ownership retained by us diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/BWINS/VoiceRecorderUtilsUU.DEF --- a/voicerecorder/BWINS/VoiceRecorderUtilsUU.DEF Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/BWINS/VoiceRecorderUtilsUU.DEF Tue May 25 12:45:15 2010 +0300 @@ -31,4 +31,6 @@ ?IsUsbActive@CVRUSBStateHanlder@@SAHXZ @ 30 NONAME ; int CVRUSBStateHanlder::IsUsbActive(void) ?NewL@CVRUSBStateHanlder@@SAPAV1@PAVMVRUSBStateObserver@@@Z @ 31 NONAME ; class CVRUSBStateHanlder * CVRUSBStateHanlder::NewL(class MVRUSBStateObserver *) ?DriveValid@VRUtils@@SAHH@Z @ 32 NONAME ; int VRUtils::DriveValid(int) + ?MultipleMassStorageAvailable@VRUtils@@SAHXZ @ 33 NONAME ; int VRUtils::MultipleMassStorageAvailable(void) + ?GetRemovableMassStorageL@VRUtils@@SAHXZ @ 34 NONAME ; int VRUtils::GetRemovableMassStorageL(void) diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/EABI/VoiceRecorderUtilsUU.DEF --- a/voicerecorder/EABI/VoiceRecorderUtilsUU.DEF Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/EABI/VoiceRecorderUtilsUU.DEF Tue May 25 12:45:15 2010 +0300 @@ -34,4 +34,6 @@ _ZN7VRUtils10DriveValidEi @ 33 NONAME _ZTI18CVRUSBStateHanlder @ 34 NONAME _ZTV18CVRUSBStateHanlder @ 35 NONAME + _ZN7VRUtils28MultipleMassStorageAvailableEv @ 36 NONAME + _ZN7VRUtils24GetRemovableMassStorageLEv @ 37 NONAME diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/RecViewInc/CVRRecView.h --- a/voicerecorder/RecViewInc/CVRRecView.h Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/RecViewInc/CVRRecView.h Tue May 25 12:45:15 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "MVRSelectionProvider.h" #include "MVRLayoutChangeObserver.h" diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/RecViewSrc/CVRMdaRecorder.cpp --- a/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/RecViewSrc/CVRMdaRecorder.cpp Tue May 25 12:45:15 2010 +0300 @@ -431,7 +431,7 @@ { //mmc card - if ( iMemo->StorageDrive() == EDriveF) + if ( iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL()) { VRUtils::ShowMemoryFullConfirmationQuery(ETrue); } @@ -801,7 +801,7 @@ if (SysUtil::DiskSpaceBelowCriticalLevelL( &fs, KVRRecStartMemBuf, iMemo->StorageDrive())) #endif { - if ( iMemo->StorageDrive() == EDriveF) + if ( iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL()) { VRUtils::ShowMemoryFullConfirmationQuery(ETrue); } diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/RecViewSrc/CVRRecViewModel.cpp --- a/voicerecorder/RecViewSrc/CVRRecViewModel.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/RecViewSrc/CVRRecViewModel.cpp Tue May 25 12:45:15 2010 +0300 @@ -134,7 +134,8 @@ iCurrentCallHandler->Listen( KPSUidCtsyCallInformation, KCTsyCallState, this ); //listen MMC eject - iCurrentMMCEjectHandler = CVRMediaRemovalMonitor::NewL(EDriveF, CEikonEnv::Static()->FsSession(), this); + TInt driveRemovableMassStorage = VRUtils::GetRemovableMassStorageL(); + iCurrentMMCEjectHandler = CVRMediaRemovalMonitor::NewL(driveRemovableMassStorage, CEikonEnv::Static()->FsSession(), this); if ( FeatureManager::FeatureSupported( KFeatureIdKeypadNoVoiceKey ) && FeatureManager::FeatureSupported( @@ -1589,7 +1590,7 @@ iCBAEnabled = ETrue; if ( leaveErr1 == KErrDiskFull || leaveErr2 == KErrDiskFull ) { - if ( iMemo->StorageDrive() == EDriveF) + if ( iMemo->StorageDrive() == VRUtils::GetRemovableMassStorageL()) { VRUtils::ShowMemoryFullConfirmationQuery(ETrue); } @@ -2426,7 +2427,7 @@ // Actions to take when recording TInt storageDrive = VRUtils::MemoDriveL(); - if ( storageDrive == EDriveF && !CVRUSBStateHanlder::IsUsbActive()) + if ( storageDrive == VRUtils::GetRemovableMassStorageL() && !CVRUSBStateHanlder::IsUsbActive()) { //exit for mmc dismount TWsEvent event; diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/RecViewSrc/CVRStateInfoPanel.cpp --- a/voicerecorder/RecViewSrc/CVRStateInfoPanel.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/RecViewSrc/CVRStateInfoPanel.cpp Tue May 25 12:45:15 2010 +0300 @@ -200,26 +200,20 @@ layoutText = AknLayoutScalable_Apps::vorec_t7(); break; } + AknLayoutUtils::LayoutLabel( iLabels.At( i ), Rect(), layoutText.LayoutLine() ); - AknLayoutUtils::LayoutLabel( iLabels.At( i ), Rect(), layoutText.LayoutLine() ); - - if ( i != ELabelStatus ) - { - // Get the correct text color from skin and override it - // The status label is always red, i guess - CCoeControl* label( iLabels.At( i ) ); - TRgb color( KRgbBlack ); - AknsUtils::GetCachedColor( iSkin, color, KAknsIIDQsnTextColors, - EAknsCIQsnTextColorsCG6 ); - // We can ignore the error, it only means we will have wrong color - TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( *label, - EColorLabelText, color ) ); - } - } - - // There's nothing rational to do here if it leaves - TRAP_IGNORE( CreateProgressBarL() ); - } + CCoeControl* label( iLabels.At( i ) ); + TRgb color( KRgbBlack ); + AknsUtils::GetCachedColor( iSkin, color, KAknsIIDQsnTextColors, + EAknsCIQsnTextColorsCG6 ); + // We can ignore the error, it only means we will have wrong color + TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( *label, + EColorLabelText, color ) ); + } + + // There's nothing rational to do here if it leaves + TRAP_IGNORE( CreateProgressBarL() ); + } // ---------------------------------------------------------------------------- diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/UtilsInc/VRUtils.h --- a/voicerecorder/UtilsInc/VRUtils.h Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/UtilsInc/VRUtils.h Tue May 25 12:45:15 2010 +0300 @@ -197,6 +197,18 @@ */ IMPORT_C static TBool DriveValid( const TInt aDrive ); + /** + * This method checks which MassStorage is/are valid + * @return The MassStorage is multi (ETrue) or only one (EFlase) + */ + IMPORT_C static TBool MultipleMassStorageAvailable(); + + /** + * This wrapper method return the removable MassStorage drive + * @return the drive + */ + IMPORT_C static TInt GetRemovableMassStorageL(); + #ifdef RD_MULTIPLE_DRIVE /** * This method sets the default memo store setting (to support multipledrives) diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/UtilsSrc/VRUSBStateHanlder.cpp --- a/voicerecorder/UtilsSrc/VRUSBStateHanlder.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/UtilsSrc/VRUSBStateHanlder.cpp Tue May 25 12:45:15 2010 +0300 @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include "VRUSBStateHanlder.h" #include "CVRRecView.h" diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/UtilsSrc/VRUtils.cpp --- a/voicerecorder/UtilsSrc/VRUtils.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/UtilsSrc/VRUtils.cpp Tue May 25 12:45:15 2010 +0300 @@ -1077,6 +1077,31 @@ } +EXPORT_C TBool VRUtils::MultipleMassStorageAvailable() + { + TBool flag( ETrue ); + TInt driveDefaultMassStorage(0); + TInt driveRemovableMassStorage(0); + TInt defaultStorageErr = DriveInfo::GetDefaultDrive( + DriveInfo::EDefaultMassStorage, driveDefaultMassStorage ); + TInt removableStorageErr = DriveInfo::GetDefaultDrive( + DriveInfo::EDefaultRemovableMassStorage, driveRemovableMassStorage ); + if ( (defaultStorageErr) || (removableStorageErr) || + ( driveDefaultMassStorage == driveRemovableMassStorage ) || + !DriveValid(driveDefaultMassStorage) || !DriveValid(driveRemovableMassStorage) ) + { flag = EFalse; } + + return flag; + } + +EXPORT_C TInt VRUtils::GetRemovableMassStorageL() + { + TInt drive(0); + User::LeaveIfError( DriveInfo::GetDefaultDrive( + DriveInfo::EDefaultRemovableMassStorage , drive ) ); + return drive; + } + #ifdef RD_MULTIPLE_DRIVE // --------------------------------------------------------------------------- // VRUtils::SetMemoDriveL diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/group/voicerecorder.rss --- a/voicerecorder/group/voicerecorder.rss Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/group/voicerecorder.rss Tue May 25 12:45:15 2010 +0300 @@ -248,7 +248,7 @@ { items= { - MENU_ITEM { command = ECmdChange; txt = qtn_vorec_settings_change; flags = EEikMenuItemSpecific; }, + MENU_ITEM { command = ECmdChange; txt = qtn_vorec_settings_change; flags = EEikMenuItemAction ; }, MENU_ITEM { command = ECmdHelp; txt = qtn_options_help; }, MENU_ITEM { command = EEikCmdExit; txt = qtn_options_exit; } }; @@ -2193,7 +2193,7 @@ { items= { - MENU_ITEM { command = ECmdChange; txt = qtn_vorec_settings_change; flags = EEikMenuItemSpecific; }, + MENU_ITEM { command = ECmdChange; txt = qtn_vorec_settings_change; flags = EEikMenuItemAction ; }, MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, MENU_ITEM { command = ECmdOk; txt = qtn_options_exit; } }; diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/gsplugin/src/CVRGSPluginContainer.cpp --- a/voicerecorder/gsplugin/src/CVRGSPluginContainer.cpp Tue May 11 16:15:58 2010 +0300 +++ b/voicerecorder/gsplugin/src/CVRGSPluginContainer.cpp Tue May 25 12:45:15 2010 +0300 @@ -186,7 +186,8 @@ CleanupStack::Pop(); // settingItem id++; } - + if ( VRUtils::MultipleMassStorageAvailable() ) + { // Add memo store setting // Create the memo store item #ifndef RD_MULTIPLE_DRIVE @@ -215,11 +216,11 @@ CleanupStack::PopAndDestroy(); // itemTitle - // Add memo store item to the settings array - iSettingItemArray->AppendL( settingItem ); - CleanupStack::Pop(); // settingItem - id++; - + // Add memo store item to the settings array + iSettingItemArray->AppendL( settingItem ); + CleanupStack::Pop(); // settingItem + id++; + } } diff -r 4e5b531d23cb -r f962425b9f8b voicerecorder/sis/101F87A3.cre Binary file voicerecorder/sis/101F87A3.cre has changed