Bug 1119051 - Advance session when meta/fxa_credentials is definitely stale. r=rnewman
authorNick Alexander <nalexander@mozilla.com>
Wed, 07 Jan 2015 20:17:19 -0800
changeset 235637 2c7833c612e0fd0c90c2a9ca7bcd9f416e629332
parent 235636 4b1ab47fec937d83893a14de5097e9cb728cea2d
child 235638 a405fef5be0343fd5e01176679bf6ff61c7ceebe
push id366
push usercmanchester@mozilla.com
push dateThu, 08 Jan 2015 16:40:24 +0000
reviewersrnewman
bugs1119051
milestone37.0a1
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.
mobile/android/base/sync/MigrationSentinelSyncStage.java
--- 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();
   }
 }