public void addCapabilitiesListener(Set<ContactId> contacts,CapabilitiesListener listener) throws RcsServiceNotAvailableException, RcsGenericException {
  if (mApi == null) {
    throw new RcsServiceNotAvailableException();
  }
  if (contacts == null || contacts.isEmpty()) {
    throw new RcsIllegalArgumentException("contacts must not be null or empty!");
  }
  try {
    ICapabilitiesListener rcsListener=new CapabilitiesListenerImpl(listener);
    mCapabilitiesListeners.put(listener,new WeakReference<>(rcsListener));
    for (    ContactId contact : contacts) {
      mApi.addCapabilitiesListener2(contact,rcsListener);
    }
  }
 catch (  Exception e) {
    RcsIllegalArgumentException.assertException(e);
    throw new RcsGenericException(e);
  }
}

public void addCapabilitiesListener ( Set < ContactId > contacts , CapabilitiesListener listener ) throws RcsServiceNotAvailableException , RcsGenericException { if ( mApi == null ) { throw new RcsServiceNotAvailableException ( ) ; } if ( contacts == null || contacts . isEmpty ( ) ) { throw new RcsIllegalArgumentException ( "contacts must not be null or empty!" ) ; } try { ICapabilitiesListener rcsListener = new CapabilitiesListenerImpl ( listener ) ; mCapabilitiesListeners . put ( listener , new WeakReference < > ( rcsListener ) ) ; for ( ContactId contact : contacts ) { mApi . addCapabilitiesListener2 ( contact , rcsListener ) ; } } catch ( Exception e ) { RcsIllegalArgumentException . assertException ( e ) ; throw new RcsGenericException ( e ) ; } }
registers a capabilities listener on a list of contacts
