Source:
<code>public void sync() { if (!ReleaseUtil.isPreBetaRelease() || !User.isLoggedIn() || !isReadingListSyncEnabled()) { syncSavedPages(); if (Prefs.isReadingListsRemoteDeletePending()) { deleteRemoteReadingLists(); } L.d("Skipped sync of reading lists."); return; } CallbackTask.execute(new CallbackTask.Task<Void>() { @Override <START> public Void execute() { <END> try { UserInfo info = UserOptionDataClientSingleton.instance().get(); synchronized (ReadingListSynchronizer.this) { long localRev = Prefs.getReadingListSyncRev(); RemoteReadingLists remoteReadingLists = null; for (UserOption option : info.userjsOptions()) { if (READING_LISTS_SYNC_OPTION.equals(option.key())) { remoteReadingLists = GsonUnmarshaller .unmarshal(RemoteReadingLists.class, option.val()); } } if ((remoteReadingLists == null) || (remoteReadingLists.rev() < localRev)) { if (localRev == 0) { bumpRev(); } L.d("Pushing local reading lists to server."); UserOptionDataClientSingleton.instance() .post(new UserOption(READING_LISTS_SYNC_OPTION, GsonMarshaller.marshal(makeRemoteReadingLists()))); } else if (localRev < remoteReadingLists.rev()) { L.d("Updating local reading lists from server."); reconcileAsRightJoin(remoteReadingLists); Prefs.setReadingListSyncRev(remoteReadingLists.rev()); WikipediaApp.getInstance().getOnboardingStateMachine().setReadingListTutorial(); } else { L.d("Local and remote reading lists are in sync."); } } syncSavedPages(); } catch (IOException e) { e.printStackTrace(); } return null; } }, null); }</code><technical_language>I realize a bit cluttered in current design I recommending final sync deleting lists remotely ensure device server has. This sync occur unconditionally want _some_ device latest copy</technical_language>

Target:
public void sync() { if (!ReleaseUtil.isPreBetaRelease() || !User.isLoggedIn() || !(isReadingListSyncEnabled() || isReadingListsRemoteDeletePending())) { syncSavedPages(); L.d("Skipped sync of reading lists."); return; } CallbackTask.execute(new CallbackTask.Task<Void>() { @Override public Void execute() { try { UserInfo info = UserOptionDataClientSingleton.instance().get(); synchronized (ReadingListSynchronizer.this) { long localRev = Prefs.getReadingListSyncRev(); RemoteReadingLists remoteReadingLists = null; for (UserOption option : info.userjsOptions()) { if (READING_LISTS_SYNC_OPTION.equals(option.key())) { remoteReadingLists = GsonUnmarshaller .unmarshal(RemoteReadingLists.class, option.val()); } } if ((remoteReadingLists == null) || (remoteReadingLists.rev() < localRev)) { if (localRev == 0) { bumpRev(); } L.d("Pushing local reading lists to server."); UserOptionDataClientSingleton.instance() .post(new UserOption(READING_LISTS_SYNC_OPTION, GsonMarshaller.marshal(makeRemoteReadingLists()))); } else if (localRev < remoteReadingLists.rev()) { L.d("Updating local reading lists from server."); reconcileAsRightJoin(remoteReadingLists); Prefs.setReadingListSyncRev(remoteReadingLists.rev()); WikipediaApp.getInstance().getOnboardingStateMachine().setReadingListTutorial(); } else { L.d("Local and remote reading lists are in sync."); if (isReadingListsRemoteDeletePending()) { deleteRemoteReadingLists(); } } } syncSavedPages(); } catch (IOException e) { e.printStackTrace(); } return null; } }, null); }