Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 053cd713 authored by Marko Man's avatar Marko Man Committed by Michael Bestas
Browse files

Change most notfications category

Due to androids limited dnd implementation all notifications with
category_alarm will make sound even in dnd mode. Not all DeskClock's
notifications are actually alarms. Change appropriate notifications
to category_event, so that notifications sounds an be muted when
Do not disturb is turned on.

Change-Id: I5a5eb26fac85357e108e3008f7b57f053f81b599
parent 0f8acd12
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ final class AlarmNotifications {
                        .setAutoCancel(false)
                        .setSortKey(createSortKey(instance))
                        .setPriority(NotificationCompat.PRIORITY_DEFAULT)
                        .setCategory(NotificationCompat.CATEGORY_ALARM)
                        .setCategory(NotificationCompat.CATEGORY_EVENT)
                        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                        .setLocalOnly(true);

@@ -186,7 +186,7 @@ final class AlarmNotifications {
                        .setAutoCancel(false)
                        .setSortKey(createSortKey(instance))
                        .setPriority(NotificationCompat.PRIORITY_HIGH)
                        .setCategory(NotificationCompat.CATEGORY_ALARM)
                        .setCategory(NotificationCompat.CATEGORY_EVENT)
                        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                        .setLocalOnly(true);

@@ -307,7 +307,7 @@ final class AlarmNotifications {
                    .setGroup(UPCOMING_GROUP_KEY)
                    .setGroupSummary(true)
                    .setPriority(NotificationCompat.PRIORITY_HIGH)
                    .setCategory(NotificationCompat.CATEGORY_ALARM)
                    .setCategory(NotificationCompat.CATEGORY_EVENT)
                    .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                    .setLocalOnly(true)
                    .build();
@@ -355,7 +355,7 @@ final class AlarmNotifications {
                    .setGroup(MISSED_GROUP_KEY)
                    .setGroupSummary(true)
                    .setPriority(NotificationCompat.PRIORITY_HIGH)
                    .setCategory(NotificationCompat.CATEGORY_ALARM)
                    .setCategory(NotificationCompat.CATEGORY_EVENT)
                    .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                    .setLocalOnly(true)
                    .build();
@@ -378,7 +378,7 @@ final class AlarmNotifications {
                        .setAutoCancel(false)
                        .setSortKey(createSortKey(instance))
                        .setPriority(NotificationCompat.PRIORITY_MAX)
                        .setCategory(NotificationCompat.CATEGORY_ALARM)
                        .setCategory(NotificationCompat.CATEGORY_EVENT)
                        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                        .setLocalOnly(true);

@@ -429,7 +429,7 @@ final class AlarmNotifications {
                        .setSortKey(createSortKey(instance))
                        .setSmallIcon(R.drawable.stat_notify_alarm)
                        .setPriority(NotificationCompat.PRIORITY_HIGH)
                        .setCategory(NotificationCompat.CATEGORY_ALARM)
                        .setCategory(NotificationCompat.CATEGORY_EVENT)
                        .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                        .setLocalOnly(true);