Bangle.js: Allow reply to non-sms notifications

This commit is contained in:
José Rebelo 2024-03-27 23:35:15 +00:00
parent 665656ddc0
commit 53007a8bad
1 changed files with 4 additions and 2 deletions

View File

@ -649,8 +649,10 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
* they use a handle that was provided in an action list on the onNotification.. event */
if (deviceEvtNotificationControl.event == GBDeviceEventNotificationControl.Event.REPLY) {
Long foundHandle = mNotificationReplyAction.lookup((int)deviceEvtNotificationControl.handle);
if (foundHandle!=null)
LOG.debug("Got notification reply: handle={} foundHandle={}", deviceEvtNotificationControl.handle, foundHandle);
if (foundHandle != null) {
deviceEvtNotificationControl.handle = foundHandle;
}
}
evaluateGBDeviceEvent(deviceEvtNotificationControl);
}
@ -1280,7 +1282,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
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) {
if (action.type == NotificationSpec.Action.TYPE_WEARABLE_REPLY || action.type == NotificationSpec.Action.TYPE_SYNTECTIC_REPLY_PHONENR) {
mNotificationReplyAction.add(notificationSpec.getId(), action.handle);
canReply = true;
}