Skip to content

Commit

Permalink
Merge "Adds documentation for ContentResolver notifyChange()"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste Queru authored and android code review committed Feb 29, 2012
2 parents 704131c + d7a1aad commit 9303919
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/java/android/content/ContentResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,8 @@ public final void unregisterContentObserver(ContentObserver observer) {
}

/**
* Notify registered observers that a row was updated.
* Notify registered observers that a row was updated and attempt to sync changes
* to the network.
* To register, call {@link #registerContentObserver(android.net.Uri , boolean, android.database.ContentObserver) registerContentObserver()}.
* By default, CursorAdapter objects will get this notification.
*
Expand All @@ -1045,10 +1046,14 @@ public void notifyChange(Uri uri, ContentObserver observer) {
* Notify registered observers that a row was updated.
* To register, call {@link #registerContentObserver(android.net.Uri , boolean, android.database.ContentObserver) registerContentObserver()}.
* By default, CursorAdapter objects will get this notification.
* If syncToNetwork is true, this will attempt to schedule a local sync using the sync
* adapter that's registered for the authority of the provided uri. No account will be
* passed to the sync adapter, so all matching accounts will be synchronized.
*
* @param uri
* @param observer The observer that originated the change, may be <code>null</null>
* @param syncToNetwork If true, attempt to sync the change to the network.
* @see #requestSync(android.accounts.Account, String, android.os.Bundle)
*/
public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) {
try {
Expand Down

0 comments on commit 9303919

Please sign in to comment.