mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp
changeset 32 edd273b3192a
parent 25 d881023c13eb
child 62 b276843a15ba
--- a/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp	Fri May 14 16:21:14 2010 +0300
+++ b/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp	Thu May 27 13:19:19 2010 +0300
@@ -38,6 +38,7 @@
 #include <mpxcollectioncommanddefs.h>
 #include <UsbWatcherInternalPSKeys.h>
 #include <usbpersonalityids.h>
+#include <mtpprivatepskeys.h>
 
 #include "mpxcollectionuihelperobserver.h"
 #include "mpxcollectionuihelperimp.h"
@@ -1399,11 +1400,16 @@
         {
         TInt usbStatus;
         RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus);
-            
-        if ((usbStatus == KUsbPersonalityIdMTP) || (usbStatus == KUsbPersonalityIdPCSuiteMTP)
-                         || (usbStatus == KUsbPersonalityIdMS) )
+        
+        TInt mtpStatus = EMtpPSStatusUninitialized;
+        RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus);
+
+        MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus);
+
+        if ( (mtpStatus != EMtpPSStatusUninitialized)
+                || (usbStatus == KUsbPersonalityIdMS) )
             {
-            MPX_DEBUG1("USB is active, Leave with KErrLocked");
+            MPX_DEBUG1("MTP/USB is active, Leave with KErrLocked");
             // need to call back even if it leaves here
             iHelperObserver = (MMPXCHelperObserver*)aCallback;
             CompleteTask( aTask, KErrLocked );