public List < PrivacyList > getPrivacyLists ( ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException { Privacy privacyAnswer = getPrivacyWithListNames ( ) ; Set < String > names = privacyAnswer . getPrivacyListNames ( ) ; List < PrivacyList > lists = new ArrayList <> ( names . size ( ) ) ; for ( String listName : names ) { boolean isActiveList = listName . equals ( privacyAnswer . getActiveName ( ) ) ; boolean isDefaultList = listName . equals ( privacyAnswer . getDefaultName ( ) ) ; lists . add ( new PrivacyList ( isActiveList , isDefaultList , listName , getPrivacyListItems ( listName ) ) ) ; } return lists ; }
Answer every privacy list with the allowed and blocked permissions .