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

Commit 36800d44 authored by Ken Shirriff's avatar Ken Shirriff
Browse files

Fix AbstractTableMerger for new Account format.

eclair has a _SYNC_ACCOUNT_TYPE field that isn't in donut,
so SELECT_UNSYNC needs to be updated with that field.
The lack of it causes a SQLiteException.
bug=1906760
parent cca860fa
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -64,8 +64,9 @@ public abstract class AbstractTableMerger
    private static final String SELECT_BY_ID = BaseColumns._ID +"=?";

    private static final String SELECT_UNSYNCED =
            "(" + _SYNC_ACCOUNT + " IS NULL OR " + _SYNC_ACCOUNT + "=?) AND "
            + "(" + _SYNC_ID + " IS NULL OR (" + _SYNC_DIRTY + " > 0 AND "
            "(" + _SYNC_ACCOUNT + " IS NULL OR ("
                + _SYNC_ACCOUNT + "=? and " + _SYNC_ACCOUNT_TYPE + "=?)) and "
            + "(" + _SYNC_ID + " IS NULL OR (" + _SYNC_DIRTY + " > 0 and "
                                              + _SYNC_VERSION + " IS NOT NULL))";

    public AbstractTableMerger(SQLiteDatabase database,