delete linked contacts on turning off contact sync

This commit is contained in:
Adithya Abraham Philip
2016-02-06 02:14:32 +05:30
parent cbf6f15d91
commit d2cf56f42e
5 changed files with 36 additions and 8 deletions

View File

@@ -465,7 +465,7 @@ public class ContactHelper {
*/
public void writeKeysToContacts() {
if (Constants.DEBUG_SYNC_REMOVE_CONTACTS) {
debugDeleteRawContacts();
deleteAllContacts();
}
writeKeysToMainProfileContact();
@@ -671,7 +671,7 @@ public class ContactHelper {
*
* @return number of rows deleted
*/
private int debugDeleteRawContacts() {
public int deleteAllContacts() {
// CALLER_IS_SYNCADAPTER allows us to actually wipe the RawContact from the device, otherwise
// would be just flagged for deletion
Uri deleteUri = ContactsContract.RawContacts.CONTENT_URI.buildUpon().