src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
/**
     * Updates contact status and its resources, fires PresenceStatusChange
     * events.
     *
     * @param contact the contact which presence to update if needed.
     * @param newStatus the new status.
     */
Updates contact status and its resources, fires PresenceStatusChange
events.

@param contact the contact which presence to update if needed.
@param newStatus the new status.
Updates contact status and its resources fires PresenceStatusChange events . @param contact the contact which presence to update if needed . @param newStatus the new status .
private void updateContactStatus(
        ContactJabberImpl contact, PresenceStatus newStatus)
    {
        boolean oldMobileIndicator = contact.isMobile();
        boolean resourceUpdated = updateResources(contact, true);
        mobileIndicator.resourcesUpdated(contact);
        PresenceStatus oldStatus
            = contact.getPresenceStatus();
        if(oldStatus.equals(newStatus)
            && oldMobileIndicator == contact.isMobile())
        {
            return;
        }
        contact.updatePresenceStatus(newStatus);
        if (logger.isDebugEnabled())
            logger.debug("Will Dispatch the contact status event.");
        fireContactPresenceStatusChangeEvent(
            contact, contact.getParentContactGroup(),
            oldStatus, newStatus,
            resourceUpdated);
    }
private void updateContactStatus ( ContactJabberImpl contact , PresenceStatus newStatus ) { boolean oldMobileIndicator = contact . isMobile ( ) ; boolean resourceUpdated = updateResources ( contact , true ) ; mobileIndicator . resourcesUpdated ( contact ) ; PresenceStatus oldStatus = contact . getPresenceStatus ( ) ; if ( oldStatus . equals ( newStatus ) && oldMobileIndicator == contact . isMobile ( ) ) { return ; } contact . updatePresenceStatus ( newStatus ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Will Dispatch the contact status event." ) ; fireContactPresenceStatusChangeEvent ( contact , contact . getParentContactGroup ( ) , oldStatus , newStatus , resourceUpdated ) ; }
Updates contact status and its resources, fires PresenceStatusChange
 events.
Updates contact status and its resources fires PresenceStatusChange events .
// When status changes this may be related to a change in the // available resources. // when old and new status are the same do nothing // no change