equal
deleted
inserted
replaced
390 } |
390 } |
391 |
391 |
392 static TBool IsDriveInMountList(TUint driveLetter) |
392 static TBool IsDriveInMountList(TUint driveLetter) |
393 { |
393 { |
394 TUint16 driveLetter16 = static_cast<TUint16>(driveLetter); |
394 TUint16 driveLetter16 = static_cast<TUint16>(driveLetter); |
395 return(!mountList.Length() || KErrNotFound != mountList.Find(&driveLetter16, 1)); |
395 return KErrNotFound != mountList.Find(&driveLetter16, 1); |
396 } |
396 } |
397 |
397 |
398 void CUsbWatch::RunL() |
398 void CUsbWatch::RunL() |
399 { |
399 { |
400 gActiveControl->SetMSFinished(EFalse); |
400 gActiveControl->SetMSFinished(EFalse); |
619 gActiveControl->SetMSFinished(EFalse); |
619 gActiveControl->SetMSFinished(EFalse); |
620 } |
620 } |
621 if (driveStatus == EUsbMsDriveState_Disconnected) |
621 if (driveStatus == EUsbMsDriveState_Disconnected) |
622 { |
622 { |
623 gActiveControl->SetMSFinished(ETrue); |
623 gActiveControl->SetMSFinished(ETrue); |
|
624 } |
|
625 if ((driveStatus == EUsbMsDriveState_Connecting) && (mountList.Length() < 1)) |
|
626 { // If there are more than one drive in the device, only mount one to test. |
|
627 // For the usb test purpose, it is enough. |
|
628 mountList.Append(static_cast<TChar>(driveLetter)); |
624 } |
629 } |
625 if(IsDriveInMountList(driveLetter)) |
630 if(IsDriveInMountList(driveLetter)) |
626 { |
631 { |
627 if (driveStatus == EUsbMsDriveState_Connecting) |
632 if (driveStatus == EUsbMsDriveState_Connecting) |
628 { |
633 { |