static Uri createRcsContactIfNeeded(Context context,ContactId contactId) throws RemoteException, OperationApplicationException {
  int phoneId=getContactIdOfAddressBook(context,contactId);
  if (phoneId != INVALID_CONTACT_ID) {
    return ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,phoneId);
  }
  ContentValues values=new ContentValues();
  values.putNull(ContactsContract.Contacts.DISPLAY_NAME);
  values.put(Phone.NUMBER,contactId.toString());
  values.put(Phone.TYPE,Phone.TYPE_MOBILE);
  return createContact(context,values);
}

static Uri createRcsContactIfNeeded ( Context context , ContactId contactId ) throws RemoteException , OperationApplicationException { int phoneId = getContactIdOfAddressBook ( context , contactId ) ; if ( phoneId != INVALID_CONTACT_ID ) { return ContentUris . withAppendedId ( ContactsContract . Contacts . CONTENT_URI , phoneId ) ; } ContentValues values = new ContentValues ( ) ; values . putNull ( ContactsContract . Contacts . DISPLAY_NAME ) ; values . put ( Phone . NUMBER , contactId . toString ( ) ) ; values . put ( Phone . TYPE , Phone . TYPE_MOBILE ) ; return createContact ( context , values ) ; }
create a rcs contact if the given contact is not already present in the address book
