ContentProviderOperation which updates group display/should_sync values.
Partly fixes
2093578
} else if (isUpdate()) {
// When has changes and "before" exists, then "update"
final Builder builder = ContentProviderOperation
- .newUpdate(mUngrouped ? Settings.CONTENT_URI : Groups.CONTENT_URI);
+ .newUpdate(mUngrouped ? Settings.CONTENT_URI : addCallerIsSyncAdapterParameter(Groups.CONTENT_URI));
if (mUngrouped) {
builder.withSelection(Settings.ACCOUNT_NAME + "=? AND " + Settings.ACCOUNT_TYPE
+ "=?", new String[] {
}
}
+ private static Uri addCallerIsSyncAdapterParameter(Uri uri) {
+ return uri.buildUpon()
+ .appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
+ .build();
+ }
+
/**
* {@link Comparator} to sort by {@link Groups#_ID}.
*/