36 #include <mpxharvesterutility.h> |
36 #include <mpxharvesterutility.h> |
37 #include <mpxcommandgeneraldefs.h> |
37 #include <mpxcommandgeneraldefs.h> |
38 #include <mpxcollectioncommanddefs.h> |
38 #include <mpxcollectioncommanddefs.h> |
39 #include <UsbWatcherInternalPSKeys.h> |
39 #include <UsbWatcherInternalPSKeys.h> |
40 #include <usbpersonalityids.h> |
40 #include <usbpersonalityids.h> |
|
41 #include <mtpprivatepskeys.h> |
41 |
42 |
42 #include "mpxcollectionuihelperobserver.h" |
43 #include "mpxcollectionuihelperobserver.h" |
43 #include "mpxcollectionuihelperimp.h" |
44 #include "mpxcollectionuihelperimp.h" |
44 #include "mpxcollectionhelpercommon.h" |
45 #include "mpxcollectionhelpercommon.h" |
45 #include "mpxdeletehelper.h" |
46 #include "mpxdeletehelper.h" |
1397 || (iTask == ETaskReorderPlaylist) |
1398 || (iTask == ETaskReorderPlaylist) |
1398 || (iTask == ETaskRenameMedia)) |
1399 || (iTask == ETaskRenameMedia)) |
1399 { |
1400 { |
1400 TInt usbStatus; |
1401 TInt usbStatus; |
1401 RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus); |
1402 RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus); |
1402 |
1403 |
1403 if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP) |
1404 TInt mtpStatus = EMtpPSStatusUninitialized; |
1404 || (usbStatus == KUsbPersonalityIdMS) ) |
1405 RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus); |
1405 { |
1406 |
1406 MPX_DEBUG1("USB is active, Leave with KErrLocked"); |
1407 MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus); |
|
1408 |
|
1409 if ( (mtpStatus != EMtpPSStatusUninitialized) |
|
1410 || (usbStatus == KUsbPersonalityIdMS) ) |
|
1411 { |
|
1412 MPX_DEBUG1("MTP/USB is active, Leave with KErrLocked"); |
1407 // need to call back even if it leaves here |
1413 // need to call back even if it leaves here |
1408 iHelperObserver = (MMPXCHelperObserver*)aCallback; |
1414 iHelperObserver = (MMPXCHelperObserver*)aCallback; |
1409 CompleteTask( aTask, KErrLocked ); |
1415 CompleteTask( aTask, KErrLocked ); |
1410 //User::Leave(KErrLocked); |
1416 //User::Leave(KErrLocked); |
1411 if ((iTaskQueue->Task() != ETaskIncAddMedia)&&(iTaskQueue->Task() != ETaskIncAppendMedia)) |
1417 if ((iTaskQueue->Task() != ETaskIncAddMedia)&&(iTaskQueue->Task() != ETaskIncAppendMedia)) |