Handle moreAvailable true w/o changes (#2189704) DO NOT MERGE
* An Exchange log from Moto has shown sync behavior in which moreAvailable is set to true even though there are no changes in the sync response (i.e. the SyncKey is unchanged) * This leads to long-lived looping which impacts battery life * The fix is to recognize the behavior and prevent looping by setting moreAvailable = false Change-Id: Icf45efbc24331c874c820b7b177e39b16df445d8
This commit is contained in:
parent
ba2d6de4b7
commit
ea5b93d9b8
@ -140,7 +140,10 @@ public abstract class AbstractSyncParser extends Parser {
|
||||
mAdapter.setSyncKey(newKey, true);
|
||||
cv.put(MailboxColumns.SYNC_KEY, newKey);
|
||||
mailboxUpdated = true;
|
||||
}
|
||||
} else if (moreAvailable) {
|
||||
userLog("!! SyncKey hasn't changed, setting moreAvailable = false");
|
||||
moreAvailable = false;
|
||||
}
|
||||
// If we were pushing (i.e. auto-start), now we'll become ping-triggered
|
||||
if (mMailbox.mSyncInterval == Mailbox.CHECK_INTERVAL_PUSH) {
|
||||
mMailbox.mSyncInterval = Mailbox.CHECK_INTERVAL_PING;
|
||||
|
Loading…
Reference in New Issue
Block a user