mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-30 19:47:33 +01:00
Fix alarm notification
This commit is contained in:
parent
01f716df83
commit
33b175854a
@ -283,9 +283,11 @@ public class NotificationListener extends NotificationListenerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shouldIgnoreNotification(sbn)) {
|
if (shouldIgnoreNotification(sbn)) {
|
||||||
LOG.info("Ignoring notification");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String source = sbn.getPackageName().toLowerCase();
|
String source = sbn.getPackageName().toLowerCase();
|
||||||
Notification notification = sbn.getNotification();
|
Notification notification = sbn.getNotification();
|
||||||
@ -794,7 +796,7 @@ public class NotificationListener extends NotificationListenerService {
|
|||||||
if (!prefs.getBoolean("notifications_generic_whenscreenon", false)) {
|
if (!prefs.getBoolean("notifications_generic_whenscreenon", false)) {
|
||||||
PowerManager powermanager = (PowerManager) getSystemService(POWER_SERVICE);
|
PowerManager powermanager = (PowerManager) getSystemService(POWER_SERVICE);
|
||||||
if (powermanager != null && powermanager.isScreenOn()) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user