usbclasses/pictbridgeengine/src/dpsusbnotifier.cpp
changeset 2 468cfcb53fd1
parent 0 1e05558e2206
equal deleted inserted replaced
1:705ec7b86991 2:468cfcb53fd1
   148     IF_DEBUG(Print(_L(">>>CDpsUsbNotifier::Rollback")));
   148     IF_DEBUG(Print(_L(">>>CDpsUsbNotifier::Rollback")));
   149     // only when the personality has changed, we switch back to the previous
   149     // only when the personality has changed, we switch back to the previous
   150     // personality
   150     // personality
   151     if (iPersonality)
   151     if (iPersonality)
   152         {
   152         {
   153         if (!iConfigured || iRollback)
   153         TInt personalityId = KUsbPersonalityIdMTP;
   154     	    {
   154         iUsbM.GetCurrentPersonalityId(personalityId);
   155     	    iUsbW.SetPreviousPersonality();
   155         IF_DEBUG(Print(_L("CDpsUsbNotifier::Rollback, current personality= %d"), personalityId));
   156     	    }
   156         if(KUsbPersonalityIdPCSuiteMTP != personalityId)
   157         else
   157             {
   158     	    {
   158             if (!iConfigured || iRollback)
   159     	    iUsbW.SetPreviousPersonalityOnDisconnect();
   159                 {
   160     	    }    
   160                 iUsbW.SetPreviousPersonality();
       
   161                 }
       
   162             else
       
   163                 {
       
   164                 iUsbW.SetPreviousPersonalityOnDisconnect();
       
   165                 }
       
   166             }
   161         }
   167         }
   162     IF_DEBUG(Print(_L("<<<CDpsUsbNotifier::Rollback")));
   168     IF_DEBUG(Print(_L("<<<CDpsUsbNotifier::Rollback")));
   163     }
   169     }
   164 
   170 
   165 // ---------------------------------------------------------------------------
   171 // ---------------------------------------------------------------------------