question: public void removeCapabilitiesListener ( CapabilitiesListener listener ) throws RcsServiceNotAvailableException , RcsGenericException { if ( mApi == null ) { throw new RcsServiceNotAvailableException ( ) ; } try { WeakReference < ICapabilitiesListener > weakRef = mCapabilitiesListeners . remove ( listener ) ; if ( weakRef == null ) { return ; } ICapabilitiesListener rcsListener = weakRef . get ( ) ; if ( rcsListener != null ) { mApi . removeCapabilitiesListener ( rcsListener ) ; } } catch ( Exception e ) { RcsIllegalArgumentException . assertException ( e ) ; throw new RcsGenericException ( e ) ; } }
target:  Unregisters a capabilities listener