Update ContactSyncAdapterService.java

This commit is contained in:
Advaita 2016-03-03 01:52:21 +05:30
parent 4b3d584d1e
commit e422b3af04

View file

@ -143,6 +143,13 @@ public class ContactSyncAdapterService extends Service {
}
public static void requestContactsSync() {
// if user has disabled automatic sync, do nothing
if (!ContentResolver.getSyncAutomatically(
new Account(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE),
ContactsContract.AUTHORITY)) {
return;
}
Bundle extras = new Bundle();
// no need to wait, do it immediately
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);