From d7a1aada2d1245eaeef973bc3e37619ce8e6d593 Mon Sep 17 00:00:00 2001 From: Steve Pomeroy Date: Wed, 18 Jan 2012 16:15:59 -0500 Subject: [PATCH] Adds documentation for ContentResolver notifyChange() Adds clarifying documentation to ContentResolver#notifyChange() to explain interaction with the sync framework. Change-Id: Ia1a1ed173e230bc11aa778268749323536ca434f Signed-off-by: Steve Pomeroy --- core/java/android/content/ContentResolver.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index cc3219b33f114..780ec110cb6b4 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -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. * @@ -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 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 {