mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 03:07:32 +01:00
Bangle.js: Prevent exception in case UART RX line is empty
This seems to fix the "no incoming call notification"-issue, see https://github.com/espruino/BangleApps/issues/976
This commit is contained in:
parent
bffbea6e38
commit
e32dc8b48e
@ -155,7 +155,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
if (">Uncaught ReferenceError: \"GB\" is not defined".equals(line))
|
||||
GB.toast(getContext(), "Gadgetbridge plugin not installed on Bangle.js", Toast.LENGTH_LONG, GB.ERROR);
|
||||
else if (line.charAt(0)=='{') {
|
||||
else if (line.length() > 0 && line.charAt(0)=='{') {
|
||||
// JSON - we hope!
|
||||
try {
|
||||
JSONObject json = new JSONObject(line);
|
||||
|
Loading…
x
Reference in New Issue
Block a user