Synchronize with paired devices when a contact changes.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-10-23 12:51:28 -07:00
parent 05eba8c2f0
commit 11a93fabe5
6 changed files with 46 additions and 21 deletions

View File

@@ -70,7 +70,7 @@ public class ContactsDatabase {
this.context = context;
}
public synchronized void setRegisteredUsers(Account account, List<String> e164numbers)
public synchronized boolean setRegisteredUsers(Account account, List<String> e164numbers)
throws RemoteException, OperationApplicationException
{
Map<String, Long> currentContacts = new HashMap<>();
@@ -111,6 +111,9 @@ public class ContactsDatabase {
if (!operations.isEmpty()) {
context.getContentResolver().applyBatch(ContactsContract.AUTHORITY, operations);
return true;
} else {
return false;
}
}