public ArrayList<Phone> addAliasByName(String aliasName,String name){
  if (aliasName.contains("'"))   return null;
  ArrayList<Phone> res;
  res=ContactsManager.getMobilePhones(ctx,name);
  if (res.size() == 1) {
    Phone p=res.get(0);
    addOrUpdate(aliasName,p.getCleanNumber(),p.getContactName());
  }
  return res;
}

public ArrayList < Phone > addAliasByName ( String aliasName , String name ) { if ( aliasName . contains ( "'" ) ) return null ; ArrayList < Phone > res ; res = ContactsManager . getMobilePhones ( ctx , name ) ; if ( res . size ( ) == 1 ) { Phone p = res . get ( 0 ) ; addOrUpdate ( aliasName , p . getCleanNumber ( ) , p . getContactName ( ) ) ; } return res ; }
tries to add or update a alias returns null if the aliasname contains invalid characters returns an arraylist of phones with matching names if the list has a size of 1 the name was distinct enough to and the alias was added . otherwise the user should specify more details with help from the list
