|
@@ -401,8 +401,10 @@ public class HostageDBOpenHelper extends SQLiteOpenHelper {
|
|
|
{
|
|
|
ArrayList<SyncDevice> allDevices = this.getSyncDevices(db);
|
|
|
for (SyncDevice device : allDevices){
|
|
|
- long sync_id = deviceIDmap.get(device.getDeviceID());
|
|
|
- device.setHighest_attack_id(sync_id);
|
|
|
+ Long sync_id = deviceIDmap.get(device.getDeviceID());
|
|
|
+ long highestID = device.getHighest_attack_id();
|
|
|
+ if (sync_id != null) highestID = sync_id.longValue();
|
|
|
+ device.setHighest_attack_id(highestID);
|
|
|
}
|
|
|
this.updateSyncDevices(allDevices, db);
|
|
|
}
|