private void updateContact(List<Contact> birthdayContacts, List<Contact> systemContacts) { for (Contact systemContact : systemContacts) { for (Contact birthdayContact : birthdayContacts) { if (systemContact.userID == birthdayContact.userID) { ContactCompare result = compare(systemContact, birthdayContact); if (result != ContactCompare.EQUALS) { if (result == ContactCompare.BDAY) { // TODO: update the position is complicated. at this time all contacts will replaced writeAllContacts(systemContacts); } else { mDatabaseManager.updateContact(systemContact); } } } } } }