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.
Change-Id: I0c18ce3b7098e79e2080e401e441ad246b1d6910
http://b/2631221
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 455815f..d0b67cc 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -1561,11 +1561,7 @@
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));