code: public boolean isSubscribedToMyPresence(Jid jid) {
          if (jid == null) {
              return false;
          }
          BareJid bareJid = jid.asBareJid();
          if (connection().getXMPPServiceDomain().equals(bareJid)) {
              return true;
          }
          RosterEntry entry = getEntry(bareJid);
          if (entry == null) {
              return false;
          }
          return entry.canSeeMyPresence();
      }
docs: Check if the given JID is subscribed to the user's presence.
  <p>
  If the JID is subscribed to the user's presence then it is allowed to see the presence and
  will get notified about presence changes. Also returns true, if the JID is the service
  name of the XMPP connection (the "XMPP domain"), i.e. the XMPP service is treated like
  having an implicit subscription to the users presence.
  </p>
  Note that if the roster is not loaded, then this method will always return false.
  
  @param jid
  @return true if the given JID is allowed to see the users presence.
  @since 4.1