code: static void publishDeviceList(XMPPConnection connection, OmemoDeviceListElement deviceList)
              throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NotConnectedException,
              SmackException.NoResponseException {
  
          PubSubManager.getInstanceFor(connection, connection.getUser().asBareJid())
                  .tryToPublishAndPossibleAutoCreate(OmemoConstants.PEP_NODE_DEVICE_LIST, new PayloadItem<>(deviceList));
      }
docs: Publish the given device list to the server.
  @param connection authenticated XMPP connection.
  @param deviceList users deviceList.
  @throws InterruptedException
  @throws XMPPException.XMPPErrorException
  @throws SmackException.NotConnectedException
  @throws SmackException.NoResponseException
  @throws PubSubException.NotALeafNodeException