question: private void readSMS ( String namePattern ) { namePattern = mAliasHelper . convertAliasToNumber ( namePattern ) ; ArrayList < Contact > contacts = ContactsManager . getMatchingContacts ( sContext , namePattern ) ; if ( contacts . size ( ) > 0 ) { XmppMsg noSms = new XmppMsg ( ) ; boolean hasMatch = false ; for ( Contact contact : contacts ) { ArrayList < Sms > smsList = mSmsManager . getSms ( ContactsManager . getPhones ( sContext , contact . ids ) ) ; Collections . sort ( smsList ) ; if ( smsList . size ( ) > 0 ) { hasMatch = true ; sendSmsListOnXmpp ( smsList , contact . name , smsList . size ( ) < sSettingsMgr . smsNumber ? getString ( R . string . chat_only_got_n_sms , smsList . size ( ) ) : null ) ; } else { noSms . appendBold ( contact . name ) ; noSms . append ( " - " ) ; noSms . appendLine ( getString ( R . string . chat_no_sms ) ) ; } } if ( ! hasMatch ) { send ( noSms ) ; } } else { send ( R . string . chat_no_match_for , namePattern ) ; } }
target:  reads (count) SMS from all contacts matching pattern