mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-23 16:17:32 +01:00
Bangle.js stop 'toast' warning message appearing when starting the app loader. Fix https://github.com/espruino/BangleApps/issues/2496
This commit is contained in:
parent
cf0f2f3b97
commit
b16464b3b6
@ -441,8 +441,11 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
// JSON - we hope!
|
||||
try {
|
||||
JSONObject json = new JSONObject(line);
|
||||
LOG.info("UART RX JSON parsed successfully");
|
||||
handleUartRxJSON(json);
|
||||
if (json.has("t")) {
|
||||
handleUartRxJSON(json);
|
||||
LOG.info("UART RX JSON parsed successfully");
|
||||
} else
|
||||
LOG.warn("UART RX JSON parsed but doesn't contain 't' - ignoring");
|
||||
} catch (JSONException e) {
|
||||
LOG.info("UART RX JSON parse failure: "+ e.getLocalizedMessage());
|
||||
GB.toast(getContext(), "Malformed JSON from Bangle.js: " + e.getLocalizedMessage(), Toast.LENGTH_LONG, GB.ERROR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user