44 #include <DRMEventAddRemove.h> |
44 #include <DRMEventAddRemove.h> |
45 #include <Oma2Agent.h> |
45 #include <Oma2Agent.h> |
46 #include <caf/caferr.h> |
46 #include <caf/caferr.h> |
47 #include <caf/content.h> |
47 #include <caf/content.h> |
48 #include <caf/data.h> |
48 #include <caf/data.h> |
49 #include <UsbWatcherInternalPSKeys.h> |
49 #include <mtpprivatepskeys.h> |
50 #include <usbpersonalityids.h> |
|
51 |
50 |
52 #include "mpxharvesterfilehandlerimp.h" |
51 #include "mpxharvesterfilehandlerimp.h" |
53 #include "mpxfolderscanner.h" |
52 #include "mpxfolderscanner.h" |
54 #include "mpxdbsynchronizer.h" |
53 #include "mpxdbsynchronizer.h" |
55 #include "mpxfoldermonitor.h" |
54 #include "mpxfoldermonitor.h" |
297 iCollectionUtil->Close(); |
296 iCollectionUtil->Close(); |
298 iCollectionUtil = NULL; |
297 iCollectionUtil = NULL; |
299 } |
298 } |
300 iCollectionUtil = MMPXCollectionUtility::NewL( NULL, KMusicPlayerUid ); |
299 iCollectionUtil = MMPXCollectionUtility::NewL( NULL, KMusicPlayerUid ); |
301 |
300 |
302 // cenrep key need to be checked whether USB cable is connected in MTP/Combined Mode |
301 // cenrep key need to be checked whether MTP is connected |
303 // to prevent refresh |
302 // to prevent refresh |
304 TInt usbStatus; |
303 TInt mtpStatus = EMtpPSStatusUninitialized; |
305 RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus); |
304 RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus); |
306 |
305 |
307 if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP)) |
306 MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus); |
308 { |
307 |
309 MPX_DEBUG1("USB is active, Leave with KErrLocked"); |
308 if (mtpStatus != EMtpPSStatusUninitialized) |
|
309 { |
|
310 MPX_DEBUG1("MTP is active, Leave with KErrLocked"); |
310 // need to call back even if it leaves here |
311 // need to call back even if it leaves here |
311 iCollectionUtil->Collection().NotifyL( EMcMsgRefreshEnd, KErrLocked ); |
312 iCollectionUtil->Collection().NotifyL( EMcMsgRefreshEnd, KErrLocked ); |
312 //User::Leave(KErrLocked); |
313 //User::Leave(KErrLocked); |
313 return; |
314 return; |
314 } |
315 } |