diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java index fd3c35da0131..061bf42137b8 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java @@ -75,6 +75,18 @@ public class AndroidBrowserBookmarksDataAccessor extends AndroidBrowserRepositor return BrowserContractHelpers.BOOKMARKS_CONTENT_URI; } + /** + * Order bookmarks by type, ensuring that folders will be processed before other records during + * an upload. This is in support of payload-size validation. See Bug 1343726. + */ + @Override + public Cursor fetchSince(long timestamp) throws NullCursorException { + return queryHelper.safeQuery(".fetchSince", + getAllColumns(), + dateModifiedWhere(timestamp), + null, BrowserContract.Bookmarks.TYPE + " ASC"); + } + protected static Uri getPositionsUri() { return BrowserContractHelpers.BOOKMARKS_POSITIONS_CONTENT_URI; }