I use a ContentProvider
to handle my data, and an AbstractThreadedSyncAdapter
to sync it. In my SyncAdapter.onPerformSync
method, I use the ContentProviderClient
parameter to add some data. However, when I update my data, my provider notifies the observers:
if (updateCount > 0)
getContext().getContentResolver().notifyChange(uri, null);
The UI is refreshed, that's good, but… the sync adapter is notified too. And another sync is queued.
Is there any way to prevent this, ignoring (in the SyncAdapter
only) the modifications done during the onPerormSync
call?