mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 08:05:55 +01:00
Test Device: Fix NPE when using the database
This commit is contained in:
parent
a3bd7a297a
commit
ad256fade0
@ -21,7 +21,6 @@ import android.os.Handler;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.sony.headphones.SonyHeadphonesCoordinator;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.test.TestDeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.test.TestDeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.test.TestFeature;
|
import nodomain.freeyourgadget.gadgetbridge.devices.test.TestFeature;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
@ -42,6 +41,10 @@ public class TestDeviceSupport extends AbstractDeviceSupport {
|
|||||||
handler.postDelayed(() -> {
|
handler.postDelayed(() -> {
|
||||||
LOG.info("Initialized");
|
LOG.info("Initialized");
|
||||||
|
|
||||||
|
getDevice().setFirmwareVersion("1.0.0");
|
||||||
|
getDevice().setFirmwareVersion2("N/A");
|
||||||
|
getDevice().setModel("0.1.7");
|
||||||
|
|
||||||
if (getCoordinator().supportsLedColor()) {
|
if (getCoordinator().supportsLedColor()) {
|
||||||
getDevice().setExtraInfo("led_color", 0xff3061e3);
|
getDevice().setExtraInfo("led_color", 0xff3061e3);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user