mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-17 21:06:48 +01:00
Pebble: make sure to not display "open on phone" and "dismiss" when the source of a notification was our AlarmClockReceiver
This commit is contained in:
parent
ee28ccd4fe
commit
f956d94181
@ -49,6 +49,7 @@ public class AlarmClockReceiver extends BroadcastReceiver {
|
|||||||
NotificationSpec spec = new NotificationSpec();
|
NotificationSpec spec = new NotificationSpec();
|
||||||
spec.type = NotificationType.GENERIC_ALARM_CLOCK;
|
spec.type = NotificationType.GENERIC_ALARM_CLOCK;
|
||||||
spec.id = lastId;
|
spec.id = lastId;
|
||||||
|
spec.sourceName = "ALARMCLOCKRECEIVER";
|
||||||
// can we get the alarm title somehow?
|
// can we get the alarm title somehow?
|
||||||
GBApplication.deviceService().onNotification(spec);
|
GBApplication.deviceService().onNotification(spec);
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
|||||||
|
|
||||||
byte dismiss_action_id;
|
byte dismiss_action_id;
|
||||||
|
|
||||||
if (hasHandle) {
|
if (hasHandle && !"ALARMCLOCKRECEIVER".equals(sourceName)) {
|
||||||
actions_count = 3;
|
actions_count = 3;
|
||||||
dismiss_string = "Dismiss";
|
dismiss_string = "Dismiss";
|
||||||
dismiss_action_id = 0x02;
|
dismiss_action_id = 0x02;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user