public class ContentObservable extends Observable<ContentObserver>
Observable
for ContentObserver
that provides methods for sending notifications to a list of
ContentObserver
objects.mObservers
Constructor and Description |
---|
ContentObservable() |
Modifier and Type | Method and Description |
---|---|
void |
dispatchChange(boolean selfChange)
Deprecated.
Use
dispatchChange(boolean, Uri) instead. |
void |
dispatchChange(boolean selfChange,
Uri uri)
Invokes
ContentObserver.dispatchChange(boolean, Uri) on each observer. |
void |
notifyChange(boolean selfChange)
Deprecated.
Use
dispatchChange(boolean) instead. |
void |
registerObserver(ContentObserver observer)
Adds an observer to the list.
|
unregisterAll, unregisterObserver
public void registerObserver(ContentObserver observer)
Observable
registerObserver
in class Observable<ContentObserver>
observer
- the observer to register@Deprecated public void dispatchChange(boolean selfChange)
dispatchChange(boolean, Uri)
instead.ContentObserver.dispatchChange(boolean)
on each observer.
If selfChange
is true, only delivers the notification
to the observer if it has indicated that it wants to receive self-change
notifications by implementing ContentObserver.deliverSelfNotifications()
to return true.
selfChange
- True if this is a self-change notification.public void dispatchChange(boolean selfChange, Uri uri)
ContentObserver.dispatchChange(boolean, Uri)
on each observer.
Includes the changed content Uri when available.
If selfChange
is true, only delivers the notification
to the observer if it has indicated that it wants to receive self-change
notifications by implementing ContentObserver.deliverSelfNotifications()
to return true.
selfChange
- True if this is a self-change notification.uri
- The Uri of the changed content, or null if unknown.@Deprecated public void notifyChange(boolean selfChange)
dispatchChange(boolean)
instead.ContentObserver.onChange(boolean)
on each observer.selfChange
- True if this is a self-change notification.