1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-10-02 11:17:00 +02:00

Test Device: Fix NPE when using the database

This commit is contained in:
José Rebelo 2024-02-16 23:09:46 +00:00
parent a3bd7a297a
commit ad256fade0

View File

@ -21,7 +21,6 @@ import android.os.Handler;
import org.slf4j.Logger;
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.TestFeature;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
@ -42,6 +41,10 @@ public class TestDeviceSupport extends AbstractDeviceSupport {
handler.postDelayed(() -> {
LOG.info("Initialized");
getDevice().setFirmwareVersion("1.0.0");
getDevice().setFirmwareVersion2("N/A");
getDevice().setModel("0.1.7");
if (getCoordinator().supportsLedColor()) {
getDevice().setExtraInfo("led_color", 0xff3061e3);
} else {