question: public ArrayList < XmppFriend > retrieveFriendList ( ) { ArrayList < XmppFriend > friends = new ArrayList < XmppFriend > ( ) ; if ( sConnection != null && sConnection . isAuthenticated ( ) ) { try { String userID ; String status ; Roster roster = Roster . getInstanceFor ( sConnection ) ; for ( RosterEntry r : roster . getEntries ( ) ) { userID = r . getUser ( ) ; status = retrieveStatusMessage ( userID ) ; friends . add ( new XmppFriend ( userID , r . getName ( ) , status , retrieveState ( userID ) ) ) ; } sendFriendList ( friends ) ; } catch ( Exception ex ) { Log . w ( "Failed to retrieve Xmpp Friend list" , ex ) ; } } return friends ; }
target:  retrieves the current xmpp rooster and sends a broadcast ACTION_XMPP_PRESENCE_CHANGED for every friend does nothing if we are offline