mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Use TypeName for identifying non-LE device when pairing LE counterpart.
Previous changes deprecated the numeric Type property, making the database query fail when pairing the BT-LE part of a Pebble device.
This commit is contained in:
parent
08a8b6a8fd
commit
e86912e681
@ -143,7 +143,7 @@ public class PebblePairingActivity extends AbstractGBActivity implements Bonding
|
||||
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||
DaoSession session = dbHandler.getDaoSession();
|
||||
DeviceDao deviceDao = session.getDeviceDao();
|
||||
Query<Device> query = deviceDao.queryBuilder().where(DeviceDao.Properties.Type.eq(1), DeviceDao.Properties.Identifier.like("%" + expectedSuffix)).build();
|
||||
Query<Device> query = deviceDao.queryBuilder().where(DeviceDao.Properties.TypeName.eq("PEBBLE"), DeviceDao.Properties.Identifier.like("%" + expectedSuffix)).build();
|
||||
|
||||
List<Device> devices = query.list();
|
||||
if (devices.size() == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user