|
@@ -1578,7 +1578,7 @@ public class HostageDBOpenHelper extends SQLiteOpenHelper {
|
|
|
+" ( "
|
|
|
+ " A." + AttackEntry.COLUMN_NAME_DEVICE + " IN " + updatedDeviceMap.keySet()
|
|
|
+ " ) "
|
|
|
- + " GROUP BY " + AttackEntry.TABLE_NAME + "." + AttackEntry.COLUMN_NAME_DEVICE
|
|
|
+ //+ " GROUP BY " + AttackEntry.TABLE_NAME + "." + AttackEntry.COLUMN_NAME_DEVICE
|
|
|
+ " ORDER BY " + AttackEntry.TABLE_NAME + "." + AttackEntry.COLUMN_NAME_SYNC_ID + " DESC";
|
|
|
SQLiteDatabase db = this.getReadableDatabase();
|
|
|
Cursor cursor = db.rawQuery(selectQuery, null);
|
|
@@ -1590,6 +1590,8 @@ public class HostageDBOpenHelper extends SQLiteOpenHelper {
|
|
|
// Adding record to list
|
|
|
if (record.getSync_id() > updatedDeviceMap.get(record.getDevice())) {
|
|
|
recordList.add(record);
|
|
|
+ } else {
|
|
|
+ break;
|
|
|
}
|
|
|
} while (cursor.moveToNext());
|
|
|
}
|