Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26763754 authored by Ken Shirriff's avatar Ken Shirriff
Browse files

resolved conflicts for merge of 716b56 to master

parents 0d2037be 716b5681
Loading
Loading
Loading
Loading
+28 −20
Original line number Diff line number Diff line
@@ -63,9 +63,11 @@ public abstract class AbstractTableMerger
            _SYNC_ID +"=? and " + _SYNC_ACCOUNT + "=? and " + _SYNC_ACCOUNT_TYPE + "=?";
    private static final String SELECT_BY_ID = BaseColumns._ID +"=?";

    // The last clause rejects events with a null _SYNC_VERSION if they've already been synced
    private static final String SELECT_UNSYNCED = ""
            + _SYNC_DIRTY + " > 0 and ((" + _SYNC_ACCOUNT + "=? AND " + _SYNC_ACCOUNT_TYPE + "=?) "
            + "or " + _SYNC_ACCOUNT + " is null)";
            + "or " + _SYNC_ACCOUNT + " is null) "
            + "and (" + _SYNC_VERSION + " is not null or " + _SYNC_ACCOUNT + " is null)";

    public AbstractTableMerger(SQLiteDatabase database,
            String table, Uri tableURL, String deletedTable,
@@ -365,6 +367,11 @@ public abstract class AbstractTableMerger

                if (!TextUtils.isEmpty(localSyncID)) {
                    // An existing server item has changed
                    // If serverSyncVersion is null, there is no edit URL;
                    // server won't let this change be written.
                    // Just hold onto it, I guess, in case the server permissions
                    // change later.
                    if (serverSyncVersion != null) {
                        boolean recordChanged = (localSyncVersion == null) ||
                                !serverSyncVersion.equals(localSyncVersion);
                        if (recordChanged) {
@@ -387,6 +394,7 @@ public abstract class AbstractTableMerger
                                update = true;
                            }
                        }
                    }
                } else {
                    // the local db doesn't know about this record so add it
                    if (Log.isLoggable(TAG, Log.VERBOSE)) {