From f44974c215ce652e5a7b9882ed5947cd21ab53d7 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Fri, 30 Sep 2016 21:27:33 +0200 Subject: [PATCH] Use findDevice() instead of getDevice() when you want to delete it --- .../freeyourgadget/gadgetbridge/activities/ControlCenter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenter.java index 77cff1fc..119ecdcf 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenter.java @@ -377,7 +377,7 @@ public class ControlCenter extends GBActivity { } try (DBHandler dbHandler = GBApplication.acquireDB()) { DaoSession session = dbHandler.getDaoSession(); - Device device = DBHelper.getDevice(gbDevice, session); + Device device = DBHelper.findDevice(gbDevice, session); if (device != null) { long deviceId = device.getId(); QueryBuilder qb;