Merge "revert a change in the SyncManager that caused it to not cancel long running syncs if the next sync had the same account and authority." into froyo

This commit is contained in:
Fred Quintana
2010-04-28 14:10:05 -07:00
committed by Android (Google) Code Review

View File

@@ -1561,11 +1561,7 @@ public class SyncManager implements OnAccountsUpdateListener {
synchronized (mSyncQueue) {
nextOpAndRunTime = mSyncQueue.nextOperation();
}
SyncOperation curOp = activeSyncContext.mSyncOperation;
if (nextOpAndRunTime != null
&& nextOpAndRunTime.second <= now
&& !nextOpAndRunTime.first.account.equals(curOp.account)
&& !nextOpAndRunTime.first.authority.equals(curOp.authority)) {
if (nextOpAndRunTime != null && nextOpAndRunTime.second <= now) {
Log.d(TAG, "canceling and rescheduling sync because it ran too long: "
+ activeSyncContext.mSyncOperation);
scheduleSyncOperation(new SyncOperation(activeSyncContext.mSyncOperation));