Merge change Id572ffc7 into eclair

* changes:
  don't throw an exception when we can't find a pending sync operation in the database
This commit is contained in:
Android (Google) Code Review
2009-10-28 18:05:09 -04:00

View File

@@ -2294,8 +2294,8 @@ class SyncManager implements OnAccountsUpdateListener {
} }
if (!mSyncStorageEngine.deleteFromPending(operationToRemove.pendingOperation)) { if (!mSyncStorageEngine.deleteFromPending(operationToRemove.pendingOperation)) {
throw new IllegalStateException("unable to find pending row for " final String errorMessage = "unable to find pending row for " + operationToRemove;
+ operationToRemove); Log.e(TAG, errorMessage, new IllegalStateException(errorMessage));
} }
if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */);
@@ -2314,7 +2314,8 @@ class SyncManager implements OnAccountsUpdateListener {
} }
if (!mSyncStorageEngine.deleteFromPending(operation.pendingOperation)) { if (!mSyncStorageEngine.deleteFromPending(operation.pendingOperation)) {
throw new IllegalStateException("unable to find pending row for " + operation); final String errorMessage = "unable to find pending row for " + operation;
Log.e(TAG, errorMessage, new IllegalStateException(errorMessage));
} }
if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */);
@@ -2336,8 +2337,8 @@ class SyncManager implements OnAccountsUpdateListener {
} }
if (!mSyncStorageEngine.deleteFromPending(syncOperation.pendingOperation)) { if (!mSyncStorageEngine.deleteFromPending(syncOperation.pendingOperation)) {
throw new IllegalStateException("unable to find pending row for " final String errorMessage = "unable to find pending row for " + syncOperation;
+ syncOperation); Log.e(TAG, errorMessage, new IllegalStateException(errorMessage));
} }
if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */); if (DEBUG_CHECK_DATA_CONSISTENCY) debugCheckDataStructures(true /* check the DB */);