code: public boolean multiUserChatSupportsOmemo(MultiUserChat multiUserChat)
              throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
              SmackException.NoResponseException {
          EntityBareJid jid = multiUserChat.getRoom();
          RoomInfo roomInfo = MultiUserChatManager.getInstanceFor(connection()).getRoomInfo(jid);
          return roomInfo.isNonanonymous() && roomInfo.isMembersOnly();
      }
docs: Returns true, if the MUC with the EntityBareJid multiUserChat is non-anonymous and members only (prerequisite
  for OMEMO encryption in MUC).
  
  @param multiUserChat MUC
  @return true if chat supports OMEMO
  @throws XMPPException.XMPPErrorException     if
  @throws SmackException.NotConnectedException something
  @throws InterruptedException                 goes
  @throws SmackException.NoResponseException   wrong