mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-08 23:45:38 +02: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…
Reference in New Issue
Block a user