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

Commit b4d1b477 authored by Dan Pasanen's avatar Dan Pasanen
Browse files

DeskClock: use low priority channel for snooze notification

* Chances are the user has just completed a back-breaking maneuver
  to find and snooze their extremely loud and annoying alarm. There's
  no need to alert them again. Let the pour user sleep.

* Make it ongoing too, to prevent accidental swiping away of the
  snoozed alarm notification which may happen due to side effects of
  PASD (post-alarm stress disorder).

Change-Id: Id949cff72905c5226ade6b05abeca4c8d0a541c2
parent c0552a2b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ final class AlarmNotifications {
        Utils.createNotificationChannelsIfNeeded(context);

        Notification.Builder builder = new Notification.Builder(context,
                    Utils.ALARM_CHANNEL)
                    Utils.ALARM_CHANNEL_LOW_PRIORITY)
                .setShowWhen(false)
                .setContentTitle(instance.getLabelOrDefault(context))
                .setContentText(context.getString(R.string.alarm_alert_snooze_until,
@@ -320,6 +320,7 @@ final class AlarmNotifications {
                .setSortKey(createSortKey(instance))
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setOngoing(true)
                .setLocalOnly(true);

        if (Utils.isNOrLater()) {