1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 01:55:50 +01:00

Bangle.js: fix null pointer issue for debug messages, and ensure '...' special char is just replaced with '...'

This commit is contained in:
Gordon Williams 2022-06-14 14:30:33 +01:00
parent c11af9e95c
commit f606e85e1b

View File

@ -654,6 +654,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
public String renderUnicodeAsImage(String txt) {
if (txt==null) return null;
// Simple conversions
txt = txt.replaceAll("", "...");
/* If we're not doing conversion, pass this right back (we use the EmojiConverter
As we would have done if BangleJSCoordinator.supportsUnicodeEmojis had reported false */
Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()));
@ -689,6 +691,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
@Override
public void onNotification(NotificationSpec notificationSpec) {
if (notificationSpec.attachedActions!=null)
for (int i=0;i<notificationSpec.attachedActions.size();i++) {
NotificationSpec.Action action = notificationSpec.attachedActions.get(i);
if (action.type==NotificationSpec.Action.TYPE_WEARABLE_REPLY)