public int updateUserPresence(Presence newPresence) { try { mConnection.updateUserPresenceAsync(newPresence); } catch (ImException e) { return e.getImError().getCode(); } return ImErrorInfo.NO_ERROR; }