1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-10-02 19:27:08 +02:00

Fix alarm notification

This commit is contained in:
mamutcho 2020-03-13 20:43:41 +02:00
parent 01f716df83
commit 33b175854a

View File

@ -283,8 +283,10 @@ public class NotificationListener extends NotificationListenerService {
}
if (shouldIgnoreNotification(sbn)) {
LOG.info("Ignoring notification");
return;
if (!"com.sec.android.app.clockpackage".equals(sbn.getPackageName())) { // workaround to allow phone alarm notification
LOG.info("Ignore notification: " + sbn.getPackageName()); // need to fix
return;
}
}
String source = sbn.getPackageName().toLowerCase();
@ -794,7 +796,7 @@ public class NotificationListener extends NotificationListenerService {
if (!prefs.getBoolean("notifications_generic_whenscreenon", false)) {
PowerManager powermanager = (PowerManager) getSystemService(POWER_SERVICE);
if (powermanager != null && powermanager.isScreenOn()) {
// LOG.info("Not forwarding notification, screen seems to be on and settings do not allow this");
LOG.info("Not forwarding notification, screen seems to be on and settings do not allow this");
return true;
}
}