mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-29 12:05:53 +01:00
Handle MiBand2 device type
This commit is contained in:
parent
a38bea892a
commit
8766fc5269
@ -7,5 +7,6 @@ public enum DeviceType {
|
||||
UNKNOWN,
|
||||
PEBBLE,
|
||||
TEST,
|
||||
MIBAND
|
||||
MIBAND,
|
||||
MIBAND2
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import java.util.EnumSet;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBand2Support;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.PebbleSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
@ -84,6 +85,9 @@ public class DeviceSupportFactory {
|
||||
case MIBAND:
|
||||
deviceSupport = new ServiceDeviceSupport(new MiBandSupport(), EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
break;
|
||||
case MIBAND2:
|
||||
deviceSupport = new ServiceDeviceSupport(new MiBand2Support(), EnumSet.of(ServiceDeviceSupport.Flags.THROTTLING, ServiceDeviceSupport.Flags.BUSY_CHECKING));
|
||||
break;
|
||||
}
|
||||
if (deviceSupport != null) {
|
||||
deviceSupport.setContext(gbDevice, mBtAdapter, mContext);
|
||||
|
Loading…
Reference in New Issue
Block a user