1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-03 17:02:13 +01:00

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

View File

@ -649,9 +649,11 @@ 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;
}