--- a/usbclasses/pictbridgeengine/src/dpsptpnotifier.cpp Thu Jan 07 13:25:34 2010 +0200
+++ b/usbclasses/pictbridgeengine/src/dpsptpnotifier.cpp Mon Jan 18 21:13:23 2010 +0200
@@ -72,8 +72,20 @@
IF_DEBUG(Print(_L(">>>CDpsPtpNotifier::ChangePtpPersonality")));
if (!IsActive())
{
- iNotifier->iUsbW.SetPersonality(iStatus, KUsbPersonalityIdMTP, ETrue);
- SetActive();
+ TInt personalityId = KUsbPersonalityIdMTP;
+ iNotifier->iUsbM.GetCurrentPersonalityId(personalityId);
+ IF_DEBUG(Print(_L("CDpsPtpNotifier::ChangePtpPersonality, current personality= %d"), personalityId));
+ if(KUsbPersonalityIdPCSuiteMTP == personalityId)
+ {
+ TRequestStatus* statusPtr = &iStatus;
+ User::RequestComplete(statusPtr, KErrNone);
+ SetActive();
+ }
+ else
+ {
+ iNotifier->iUsbW.SetPersonality(iStatus, KUsbPersonalityIdMTP, ETrue);
+ SetActive();
+ }
}
IF_DEBUG(Print(_L("<<<CDpsPtpNotifier::ChangePtpPersonality")));
}