Merge change 7948 into donut

* changes:
  Fix updates from read-only calendar.
This commit is contained in:
Android (Google) Code Review
2009-07-20 16:22:47 -07:00

View File

@@ -369,30 +369,33 @@ public abstract class AbstractTableMerger
// An existing server item has changed // An existing server item has changed
// If serverSyncVersion is null, there is no edit URL; // If serverSyncVersion is null, there is no edit URL;
// server won't let this change be written. // server won't let this change be written.
// Just hold onto it, I guess, in case the server permissions boolean recordChanged = (localSyncVersion == null) ||
// change later. (serverSyncVersion == null) ||
if (serverSyncVersion != null) { !serverSyncVersion.equals(localSyncVersion);
boolean recordChanged = (localSyncVersion == null) || if (recordChanged) {
!serverSyncVersion.equals(localSyncVersion); if (localSyncDirty) {
if (recordChanged) { if (Log.isLoggable(TAG, Log.VERBOSE)) {
if (localSyncDirty) { Log.v(TAG, "remote record " + serverSyncId
if (Log.isLoggable(TAG, Log.VERBOSE)) { + " conflicts with local _sync_id " + localSyncID
Log.v(TAG, "remote record " + serverSyncId + ", local _id " + localRowId);
+ " conflicts with local _sync_id " + localSyncID
+ ", local _id " + localRowId);
}
conflict = true;
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"remote record " +
serverSyncId +
" updates local _sync_id " +
localSyncID + ", local _id " +
localRowId);
}
update = true;
} }
conflict = true;
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"remote record " +
serverSyncId +
" updates local _sync_id " +
localSyncID + ", local _id " +
localRowId);
}
update = true;
}
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"Skipping update: localSyncVersion: " + localSyncVersion +
", serverSyncVersion: " + serverSyncVersion);
} }
} }
} else { } else {