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

Commit 49e5e252 authored by Budi Kusmiantoro's avatar Budi Kusmiantoro
Browse files

Show alarm/timer notifications on lockscreen

Bug: 17509785
Change-Id: Ic9a0755e629012b5a5b04d2e0728a5ad664b6e72
parent 6902a736
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -72,7 +72,8 @@ public final class AlarmNotifications {
                .setOngoing(false)
                .setAutoCancel(false)
                .setPriority(Notification.PRIORITY_DEFAULT)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);

        // Setup up hide notification
        Intent hideIntent = AlarmStateManager.createStateChangeIntent(context, "DELETE_TAG",
@@ -110,7 +111,8 @@ public final class AlarmNotifications {
                .setOngoing(true)
                .setAutoCancel(false)
                .setPriority(Notification.PRIORITY_HIGH)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);

        // Setup up dismiss action
        Intent dismissIntent = AlarmStateManager.createStateChangeIntent(context, "DISMISS_TAG",
@@ -143,7 +145,8 @@ public final class AlarmNotifications {
                .setOngoing(true)
                .setAutoCancel(false)
                .setPriority(Notification.PRIORITY_MAX)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);

        // Setup up dismiss action
        Intent dismissIntent = AlarmStateManager.createStateChangeIntent(context, "DISMISS_TAG",
@@ -175,7 +178,8 @@ public final class AlarmNotifications {
                .setContentText(contextText)
                .setSmallIcon(R.drawable.stat_notify_alarm)
                .setPriority(Notification.PRIORITY_HIGH)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);

        // Setup dismiss intent
        Intent dismissIntent = AlarmStateManager.createStateChangeIntent(context, "DISMISS_TAG",
@@ -211,7 +215,8 @@ public final class AlarmNotifications {
                .setAutoCancel(false)
                .setDefaults(Notification.DEFAULT_LIGHTS)
                .setWhen(0)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);

        // Setup Snooze Action
        Intent snoozeIntent = AlarmStateManager.createStateChangeIntent(context, "SNOOZE_TAG",
+3 −1
Original line number Diff line number Diff line
@@ -338,7 +338,8 @@ public class TimerReceiver extends BroadcastReceiver {
                .setPriority(priority)
                .setShowWhen(false)
                .setSmallIcon(R.drawable.stat_notify_timer)
                .setCategory(Notification.CATEGORY_ALARM);
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);
        if (showTicker) {
            builder.setTicker(text);
        }
@@ -460,6 +461,7 @@ public class TimerReceiver extends BroadcastReceiver {
                .setDefaults(Notification.DEFAULT_LIGHTS)
                .setWhen(0)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .build();

        // Send the notification using the timer's id to identify the