accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp
changeset 16 ef634fd8dac3
parent 13 cef4ff1e6c4f
child 22 effbe8362efc
equal deleted inserted replaced
13:cef4ff1e6c4f 16:ef634fd8dac3
   849     TAccPolGenericIDArray genericIDArray;
   849     TAccPolGenericIDArray genericIDArray;
   850     TAccPolAccessoryMode accMode;
   850     TAccPolAccessoryMode accMode;
   851 
   851 
   852     iServerModel->CurrentConnectionStatusL( genericIDArray );
   852     iServerModel->CurrentConnectionStatusL( genericIDArray );
   853 
   853 
       
   854     if( (EFalse == aAudioOutputStatus) && (KErrUnknown != aDbId) ) 
       
   855         { 
       
   856         TInt index( TAccPolGenericIDArrayAccessor::FindWithUniqueIDL( 
       
   857                 genericIDArray, aDbId) ); 
       
   858         TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(genericIDArray, index); 
       
   859         }
       
   860 
   854     accMode = iPolicy->ResolveAccessoryModeL( genericIDArray, 
   861     accMode = iPolicy->ResolveAccessoryModeL( genericIDArray, 
   855                                               aDbId, 
   862                                               aDbId, 
   856                                               aAudioOutputStatus, 
   863                                               aAudioOutputStatus, 
   857                                               iServerModel->AccessoryMode(), 
   864                                               iServerModel->AccessoryMode(), 
   858                                               iServerModel->UniqueID() );
   865                                               iServerModel->UniqueID() );
   888 			    case EAccModeHeadphones:
   895 			    case EAccModeHeadphones:
   889 			    {
   896 			    {
   890 				  TAccPolGenericID genericID;
   897 				  TAccPolGenericID genericID;
   891 				  iServerModel->GetLastConnectedAccessoryL( genericID );
   898 				  iServerModel->GetLastConnectedAccessoryL( genericID );
   892 				  TUint32 num = genericID.SubblockCaps();
   899 				  TUint32 num = genericID.SubblockCaps();
   893 				  if( num & KSBAudioSubblock )
   900 				  if ( genericID.PhysicalConnectionCaps() != KPCHDMI ) // No info note for HDMI
   894 				      {
   901 				      {
   895 					    CCapValue* capValue = iServerModel->CapabilityStorage().GetCapability( genericID, KAccIntegratedAudioInput );
   902                       if( num & KSBAudioSubblock )
   896 					    if( iInformationNoteDefault )
   903                           {
   897 						      {
   904                             CCapValue* capValue = iServerModel->CapabilityStorage().GetCapability( genericID, KAccIntegratedAudioInput );
   898 						      noteValue = iInformationNoteDefault;
   905                             if( iInformationNoteDefault )
   899 						      showNote = ETrue;
   906                                   {
   900 						      }
   907                                   noteValue = iInformationNoteDefault;
   901 					    if( !capValue && !iInformationNoteDefault )
   908                                   showNote = ETrue;
   902 						      {
   909                                   }
   903 						      showNote = ETrue;
   910                             if( !capValue && !iInformationNoteDefault )
   904 						      }
   911                                   {
   905 					    }
   912                                   showNote = ETrue;
   906 				    else
   913                                   }
   907 					    {
   914                             }
   908 					    if( iInformationNoteDefault )
   915                         else
   909 						      {
   916                             {
   910 						      noteValue = iInformationNoteDefault;
   917                             if( iInformationNoteDefault )
   911 						      showNote = ETrue;
   918                                   {
   912 						      }
   919                                   noteValue = iInformationNoteDefault;
   913 					    }
   920                                   showNote = ETrue;
       
   921                                   }
       
   922                             }
       
   923 				      }
   914 				  }
   924 				  }
   915 			    break;			  
   925 			    break;			  
   916 			    default:
   926 			    default:
   917 			    {
   927 			    {
   918 				  showNote = EFalse;				
   928 				  showNote = EFalse;