javauis/amms_akn/mmacontrol/src/cammsaudiooutputcontrol.cpp
branchRCL_3
changeset 59 e5618cc85d74
parent 46 4376525cdefb
child 60 6c158198356e
equal deleted inserted replaced
46:4376525cdefb 59:e5618cc85d74
   353     DEBUG("AMMS::CAMMSAudioOutputControl::DisconnectedL +");
   353     DEBUG("AMMS::CAMMSAudioOutputControl::DisconnectedL +");
   354     TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType();
   354     TAccMonCapability deviceType = aAccessoryInfo->AccDeviceType();
   355     if (deviceType == KAccMonHeadset)
   355     if (deviceType == KAccMonHeadset)
   356     {
   356     {
   357         DEBUG("AMMS::CAMMSAudioOutputControl::DisconnectedL: Headset Disconnected");
   357         DEBUG("AMMS::CAMMSAudioOutputControl::DisconnectedL: Headset Disconnected");
       
   358         iArray.Reset();
       
   359         iAccMonitor->GetConnectedAccessoriesL(iArray);   
       
   360         TInt count = iArray.Count();
       
   361         if (count != 0)
       
   362         {   
       
   363            for (TInt i = 0; i != count; i++)
       
   364            {
       
   365               TAccMonCapability deviceType = iArray[ i ]->AccDeviceType();
       
   366               if (deviceType == KAccMonHeadset)
       
   367                  return;
       
   368            }
       
   369         }
   358         // If audio o/p preference is default and no accessories is connected or
   370         // If audio o/p preference is default and no accessories is connected or
   359         // o/p preference is not private then set the preference as public to
   371         // o/p preference is not private then set the preference as public to
   360         // volume control
   372         // volume control
   361         if ( (iRoutingUserPreference == (TInt)(CAudioOutput::ENoPreference) &&
   373         if ( (iRoutingUserPreference == (TInt)(CAudioOutput::ENoPreference) &&
   362                GetDeviceDefaultPreference() == (TInt)(CAudioOutput::EPublic)) ||
   374                GetDeviceDefaultPreference() == (TInt)(CAudioOutput::EPublic)) ||