1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-22 06:41:06 +02:00

Bangle.js - small tweak to fix occasional NullPointerException reported via Play Store

This commit is contained in:
Gordon Williams 2022-10-14 09:48:55 +01:00
parent c59249f8d1
commit eac7edfea1

View File

@ -192,7 +192,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
break;
}
case GBDevice.ACTION_DEVICE_CHANGED: {
LOG.info("ACTION_DEVICE_CHANGED " + gbDevice.getStateString());
LOG.info("ACTION_DEVICE_CHANGED " + (gbDevice!=null ? gbDevice.getStateString():""));
addReceiveHistory("\n================================================\nACTION_DEVICE_CHANGED "+gbDevice.getStateString()+" "+(new SimpleDateFormat("yyyy-mm-dd hh:mm:ss")).format(Calendar.getInstance().getTime())+"\n================================================\n");
}
}