mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp
branchRCL_3
changeset 17 6f9f6e99a23e
parent 13 4740b34b83ce
child 20 4aca42fa4eb1
equal deleted inserted replaced
14:f56ec6ce2732 17:6f9f6e99a23e
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Handles all file related activities
    14 * Description:  Handles all file related activities
    15 *  Version     : %version: da1mmcf#72.1.14.2.4.1.4.1.2.1.6 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: da1mmcf#72.1.14.2.4.1.4.1.2.1.7 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #include <e32base.h>
    20 #include <e32base.h>
    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         }