private void dial(String contactInformation,boolean makeTheCall,boolean usePhoneSpeaker){
  if (contactInformation.equals("")) {
    String lastRecipient=RecipientCmd.getLastRecipientNumber();
    String lastRecipientName=RecipientCmd.getLastRecipientName();
    if (lastRecipient != null) {
      doDial(lastRecipientName,lastRecipient,makeTheCall,usePhoneSpeaker);
    }
 else {
      send("error: last recipient not set");
    }
  }
 else {
    ResolvedContact resolvedContact=mContactsResolver.resolveContact(contactInformation,ContactsResolver.TYPE_ALL);
    if (resolvedContact == null) {
      send(R.string.chat_no_match_for,contactInformation);
    }
 else     if (resolvedContact.isDistinct()) {
      doDial(resolvedContact.getName(),resolvedContact.getNumber(),makeTheCall,usePhoneSpeaker);
    }
 else {
      askForMoreDetails(resolvedContact.getCandidates());
    }
  }
}

private void dial ( String contactInformation , boolean makeTheCall , boolean usePhoneSpeaker ) { if ( contactInformation . equals ( "" ) ) { String lastRecipient = RecipientCmd . getLastRecipientNumber ( ) ; String lastRecipientName = RecipientCmd . getLastRecipientName ( ) ; if ( lastRecipient != null ) { doDial ( lastRecipientName , lastRecipient , makeTheCall , usePhoneSpeaker ) ; } else { send ( "error: last recipient not set" ) ; } } else { ResolvedContact resolvedContact = mContactsResolver . resolveContact ( contactInformation , ContactsResolver . TYPE_ALL ) ; if ( resolvedContact == null ) { send ( R . string . chat_no_match_for , contactInformation ) ; } else if ( resolvedContact . isDistinct ( ) ) { doDial ( resolvedContact . getName ( ) , resolvedContact . getNumber ( ) , makeTheCall , usePhoneSpeaker ) ; } else { askForMoreDetails ( resolvedContact . getCandidates ( ) ) ; } } }
dial the specified contact
