Commit a3f4392a authored by Marko Man's avatar Marko Man Committed by Wang Han
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 b7abe063
......@@ -96,7 +96,7 @@ public 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);
......@@ -144,7 +144,7 @@ public 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);
......@@ -251,7 +251,7 @@ public 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();
......@@ -285,7 +285,7 @@ public 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();
......@@ -307,7 +307,7 @@ public 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);
......@@ -350,7 +350,7 @@ public 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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment