feat: configure notification filtering and dismiss all notifications

This commit is contained in:
Blendman974 committed 2026-11-06 04:21:43 +01:00
1 parent 6df52021c8
commit 1959e57d02
10 files changed
+263 -13

No files matched your search

@@ -504,6 +504,18 @@ class FaceclawMediaNotificationListenerService : NotificationListenerService() {
}
}
@JvmStatic
fun dismissAllNotifications(): Boolean {
val service = activeService ?: return false
return try {
service.cancelAllNotifications()
true
} catch (t: Throwable) {
Log.w(TAG, "failed to dismiss all notifications", t)
false
}
}
private fun emitNotificationPosted(key: String?) {
emitNotificationEvent(key) { listener, eventKey -> listener.onNotificationPosted(eventKey) }
}