Bug 1119051 - Advance session when meta/fxa_credentials is definitely stale. r=rnewman
========
https://github.com/mozilla-services/android-sync/commit/76925b2cf23c2abda75a03fba002f71ca0d54401
Author: Nick Alexander <nalexander@mozilla.com>
Date: Wed Jan 7 16:35:17 2015 -0800
Bug 1119051 - Advance session when meta/fxa_credentials is definitely stale.
--- a/mobile/android/base/sync/MigrationSentinelSyncStage.java
+++ b/mobile/android/base/sync/MigrationSentinelSyncStage.java
@@ -227,16 +227,18 @@ public class MigrationSentinelSyncStage
final InfoCollections infoCollections = session.config.infoCollections;
if (infoCollections == null) {
session.abort(null, "No info/collections set in MigrationSentinelSyncStage.");
return;
}
final long lastModified = session.config.getLastMigrationSentinelCheckTimestamp();
if (!infoCollections.updateNeeded(META_COLLECTION, lastModified)) {
+ Logger.info(LOG_TAG, "No need to check fresh meta/fxa_credentials.");
+ session.advance();
return;
}
// Let's try a fetch.
Logger.info(LOG_TAG, "Fetching meta/fxa_credentials to check for migration sentinel.");
new MigrationChecker(session).check();
}
}