equal
deleted
inserted
replaced
70 void CDpsPtpNotifier::ChangePtpPersonality() |
70 void CDpsPtpNotifier::ChangePtpPersonality() |
71 { |
71 { |
72 IF_DEBUG(Print(_L(">>>CDpsPtpNotifier::ChangePtpPersonality"))); |
72 IF_DEBUG(Print(_L(">>>CDpsPtpNotifier::ChangePtpPersonality"))); |
73 if (!IsActive()) |
73 if (!IsActive()) |
74 { |
74 { |
75 iNotifier->iUsbW.SetPersonality(iStatus, KUsbPersonalityIdMTP, ETrue); |
75 TInt personalityId = KUsbPersonalityIdMTP; |
76 SetActive(); |
76 iNotifier->iUsbM.GetCurrentPersonalityId(personalityId); |
|
77 IF_DEBUG(Print(_L("CDpsPtpNotifier::ChangePtpPersonality, current personality= %d"), personalityId)); |
|
78 if(KUsbPersonalityIdPCSuiteMTP == personalityId) |
|
79 { |
|
80 TRequestStatus* statusPtr = &iStatus; |
|
81 User::RequestComplete(statusPtr, KErrNone); |
|
82 SetActive(); |
|
83 } |
|
84 else |
|
85 { |
|
86 iNotifier->iUsbW.SetPersonality(iStatus, KUsbPersonalityIdMTP, ETrue); |
|
87 SetActive(); |
|
88 } |
77 } |
89 } |
78 IF_DEBUG(Print(_L("<<<CDpsPtpNotifier::ChangePtpPersonality"))); |
90 IF_DEBUG(Print(_L("<<<CDpsPtpNotifier::ChangePtpPersonality"))); |
79 } |
91 } |
80 |
92 |
81 // --------------------------------------------------------------------------- |
93 // --------------------------------------------------------------------------- |