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

Commit 86097d8e authored by Budi Kusmiantoro's avatar Budi Kusmiantoro
Browse files

Set deskclock notifications to local only

Bug: 14683075
Change-Id: Ie3d8843223196e672e5324ef51b9bafdf1727a82
parent b4aacfb2
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ public final class AlarmNotifications {
                .setAutoCancel(false)
                .setPriority(Notification.PRIORITY_DEFAULT)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setLocalOnly(true);

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

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

        // Setup up dismiss action
        Intent dismissIntent = AlarmStateManager.createStateChangeIntent(context,
@@ -180,7 +183,8 @@ public final class AlarmNotifications {
                .setSmallIcon(R.drawable.stat_notify_alarm)
                .setPriority(Notification.PRIORITY_HIGH)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setLocalOnly(true);

        // Setup dismiss intent
        Intent dismissIntent = AlarmStateManager.createStateChangeIntent(context,
@@ -217,7 +221,8 @@ public final class AlarmNotifications {
                .setDefaults(Notification.DEFAULT_LIGHTS)
                .setWhen(0)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setLocalOnly(true);

        // Setup Snooze Action
        Intent snoozeIntent = AlarmStateManager.createStateChangeIntent(context,
+3 −1
Original line number Diff line number Diff line
@@ -245,7 +245,9 @@ public class StopwatchService extends Service {
                .setOngoing(clockRunning)
                .setDeleteIntent(PendingIntent.getService(context, 0, dismissIntent, 0))
                .setSmallIcon(R.drawable.ic_tab_stopwatch_activated)
                .setPriority(Notification.PRIORITY_MAX).build();
                .setPriority(Notification.PRIORITY_MAX)
                .setLocalOnly(true)
                .build();
        notification.bigContentView = remoteViewsExpanded;
        mNotificationManager.notify(NOTIFICATION_ID, notification);
    }
+3 −1
Original line number Diff line number Diff line
@@ -339,7 +339,8 @@ public class TimerReceiver extends BroadcastReceiver {
                .setShowWhen(false)
                .setSmallIcon(R.drawable.stat_notify_timer)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC);
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setLocalOnly(true);
        if (showTicker) {
            builder.setTicker(text);
        }
@@ -462,6 +463,7 @@ public class TimerReceiver extends BroadcastReceiver {
                .setWhen(0)
                .setCategory(Notification.CATEGORY_ALARM)
                .setVisibility(Notification.VISIBILITY_PUBLIC)
                .setLocalOnly(true)
                .build();

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