question: 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 ) ; }
target:  Clears the presence of the all contacts. As contacts are persist between IM sessions, the presence need to be cleared after logout.