void clearPresence(){
  StringBuilder where=new StringBuilder();
  where.append(Imps.Presence.CONTACT_ID);
  where.append(" in (select _id from contacts where ");
  where.append(Imps.Contacts.ACCOUNT);
  where.append("=");
  where.append(mConn.getAccountId());
  where.append(")");
  mResolver.delete(Imps.Presence.CONTENT_URI,where.toString(),null);
}

void clearPresence ( ) { StringBuilder where = new StringBuilder ( ) ; where . append ( Imps . Presence . CONTACT_ID ) ; where . append ( " in (select _id from contacts where " ) ; where . append ( Imps . Contacts . ACCOUNT ) ; where . append ( "=" ) ; where . append ( mConn . getAccountId ( ) ) ; where . append ( ")" ) ; mResolver . delete ( Imps . Presence . CONTENT_URI , where . toString ( ) , null ) ; }
clears the presence of the all contacts . as contacts are persist between im sessions , the presence need to be cleared after logout .
