code: public synchronized boolean removeIdentity(DiscoverInfo.Identity identity) {
          if (identity.equals(this.identity)) return false;
          identities.remove(identity);
          // Notify others of a state change of SDM. In order to keep the state consistent, this
          // method is synchronized
          renewEntityCapsVersion();
          return true;
      }
docs: Remove an identity from the client. Note that the client needs at least one identity, the default identity, which
  can not be removed.
  
  @param identity
  @return true, if successful. Otherwise the default identity was given.