1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 18:45:49 +01:00

Use findDevice() instead of getDevice() when you want to delete it

This commit is contained in:
cpfeiffer 2016-09-30 21:27:33 +02:00
parent 1fd6b59bf8
commit f44974c215

View File

@ -377,7 +377,7 @@ public class ControlCenter extends GBActivity {
} }
try (DBHandler dbHandler = GBApplication.acquireDB()) { try (DBHandler dbHandler = GBApplication.acquireDB()) {
DaoSession session = dbHandler.getDaoSession(); DaoSession session = dbHandler.getDaoSession();
Device device = DBHelper.getDevice(gbDevice, session); Device device = DBHelper.findDevice(gbDevice, session);
if (device != null) { if (device != null) {
long deviceId = device.getId(); long deviceId = device.getId();
QueryBuilder qb; QueryBuilder qb;