fix(gateway): scope notification wakeups to session

This commit is contained in:
Ayaan Zaidi
2026-02-28 10:33:12 +05:30
committed by Ayaan Zaidi
parent 9d3ccf4754
commit f1bb26642c
3 changed files with 32 additions and 3 deletions

View File

@@ -137,6 +137,9 @@ class DeviceNotificationListenerService : NotificationListenerService() {
super.onNotificationPosted(sbn)
val entry = sbn?.toEntry() ?: return
DeviceNotificationStore.upsert(entry)
if (entry.packageName == packageName) {
return
}
emitNotificationsChanged(
buildJsonObject {
put("change", JsonPrimitive("posted"))
@@ -162,6 +165,9 @@ class DeviceNotificationListenerService : NotificationListenerService() {
return
}
DeviceNotificationStore.remove(key)
if (removed.packageName == packageName) {
return
}
emitNotificationsChanged(
buildJsonObject {
put("change", JsonPrimitive("removed"))