Merge pull request #1743 from advaita13/master
Contact Synchronisation Notification
This commit is contained in:
@@ -143,6 +143,13 @@ public class ContactSyncAdapterService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void requestContactsSync() {
|
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();
|
Bundle extras = new Bundle();
|
||||||
// no need to wait, do it immediately
|
// no need to wait, do it immediately
|
||||||
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user