49 #include <UsbWatcherInternalPSKeys.h> |
49 #include <UsbWatcherInternalPSKeys.h> |
50 #include <usbpersonalityids.h> |
50 #include <usbpersonalityids.h> |
51 #ifdef RD_MULTIPLE_DRIVE |
51 #ifdef RD_MULTIPLE_DRIVE |
52 #include <driveinfo.h> |
52 #include <driveinfo.h> |
53 #endif |
53 #endif |
54 #include <aknwaitdialog.h> |
54 #include <AknWaitDialog.h> |
55 _LIT( KVRCommandRecord, "record" ); |
55 _LIT( KVRCommandRecord, "record" ); |
56 |
56 |
57 // --------------------------------------------------------------------------- |
57 // --------------------------------------------------------------------------- |
58 // CVRAppUi::CVRAppUi |
58 // CVRAppUi::CVRAppUi |
59 // |
59 // |
225 // Make user insert the SD card, and choose SD card as the memo storage |
225 // Make user insert the SD card, and choose SD card as the memo storage |
226 // --------------------------------------------------------------------------- |
226 // --------------------------------------------------------------------------- |
227 // |
227 // |
228 void CVRAppUi::SetDriveL() |
228 void CVRAppUi::SetDriveL() |
229 { |
229 { |
230 if ( VRUtils::DriveValid( EDriveF ) ) |
230 TInt driveRemovableMassStorage = VRUtils::GetRemovableMassStorageL(); |
|
231 if ( VRUtils::DriveValid( (TDriveNumber) driveRemovableMassStorage ) ) |
231 { |
232 { |
232 VRUtils::SetMemoDriveL((TDriveNumber)EDriveF ); |
233 VRUtils::SetMemoDriveL( (TDriveNumber) driveRemovableMassStorage ); |
233 } |
234 } |
234 else |
235 else |
235 { |
236 { |
236 if (CVRUSBStateHanlder::IsUsbActive()) |
237 if (CVRUSBStateHanlder::IsUsbActive()) |
237 { |
238 { |
238 ShowDialogForWaitUSBPluggingOutL(); |
239 ShowDialogForWaitUSBPluggingOutL(); |
239 Exit(); |
240 Exit(); |
240 |
241 |
241 } |
242 } |
242 while (!VRUtils::DriveValid(EDriveF)) |
243 while ( !VRUtils::DriveValid( (TDriveNumber) driveRemovableMassStorage ) ) |
243 { |
244 { |
244 if (!ShowDialogForWaitStorageCardL()) |
245 if (!ShowDialogForWaitStorageCardL()) |
245 { |
246 { |
246 Exit(); |
247 Exit(); |
247 } |
248 } |
248 } |
249 } |
249 // Come to here when drive F is valid |
250 // Come to here when driveRemovableMassStorage is valid |
250 VRUtils::SetMemoDriveL((TDriveNumber) EDriveF); |
251 VRUtils::SetMemoDriveL( (TDriveNumber) driveRemovableMassStorage ); |
251 } |
252 } |
252 } |
253 } |
253 |
254 |
254 // --------------------------------------------------------------------------- |
255 // --------------------------------------------------------------------------- |
255 // This method show a dialog to warn user to insert the SD card. |
256 // This method show a dialog to warn user to insert the SD card. |
446 // |
447 // |
447 void CVRAppUi::HandleResourceChangeL( TInt aType ) |
448 void CVRAppUi::HandleResourceChangeL( TInt aType ) |
448 { |
449 { |
449 CAknViewAppUi::HandleResourceChangeL( aType ); |
450 CAknViewAppUi::HandleResourceChangeL( aType ); |
450 |
451 |
451 if (aType == KEikDynamicLayoutVariantSwitch || aType |
452 if (iLayoutChangeObserver != NULL && (aType == KEikDynamicLayoutVariantSwitch || aType |
452 == KAknsMessageSkinChange) |
453 == KAknsMessageSkinChange)) |
453 { |
454 { |
454 iLayoutChangeObserver->LayoutChangedL(aType); |
455 iLayoutChangeObserver->LayoutChangedL(aType); |
455 } |
456 } |
456 } |
457 } |
457 |
458 |