mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 03:07:32 +01:00
Bangle.js: fix null pointer issue for debug messages, and ensure '...' special char is just replaced with '...'
This commit is contained in:
parent
c11af9e95c
commit
f606e85e1b
@ -654,6 +654,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
|
|
||||||
public String renderUnicodeAsImage(String txt) {
|
public String renderUnicodeAsImage(String txt) {
|
||||||
if (txt==null) return null;
|
if (txt==null) return null;
|
||||||
|
// Simple conversions
|
||||||
|
txt = txt.replaceAll("…", "...");
|
||||||
/* If we're not doing conversion, pass this right back (we use the EmojiConverter
|
/* 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 */
|
As we would have done if BangleJSCoordinator.supportsUnicodeEmojis had reported false */
|
||||||
Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()));
|
Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()));
|
||||||
@ -689,6 +691,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotification(NotificationSpec notificationSpec) {
|
public void onNotification(NotificationSpec notificationSpec) {
|
||||||
|
if (notificationSpec.attachedActions!=null)
|
||||||
for (int i=0;i<notificationSpec.attachedActions.size();i++) {
|
for (int i=0;i<notificationSpec.attachedActions.size();i++) {
|
||||||
NotificationSpec.Action action = notificationSpec.attachedActions.get(i);
|
NotificationSpec.Action action = notificationSpec.attachedActions.get(i);
|
||||||
if (action.type==NotificationSpec.Action.TYPE_WEARABLE_REPLY)
|
if (action.type==NotificationSpec.Action.TYPE_WEARABLE_REPLY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user