I'm looking for a way to suspend notifications on a given ContentProvider
's Uri
. The use case is:
- An
Activity
is bound to aCursorAdapter
through aCursorLoader
. - A
Service
may do a lot of batch, single-row updates on aContentProvider
. - The
CursorLoader
will reload its content on every row update, as theContentProvider
notifies listeners byContentResolver#notifyChange
.
Since I cannot edit the ContentProvider
, and I have no control over the batch queries execution, is there a way to suspend notifications on a Uri
(in the executing Service
) until all of the ContentProvider
-managed queries have been executed? I need this in order to avoid the flickering caused by the continuous requerying of the CursorLoader
.