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

Commit 7bd3cc47 authored by Sean Stout's avatar Sean Stout
Browse files

Swiping away stopwatch notification does not reset stopwatch.

Bug: 30638376
Change-Id: I597871cfdae4420ed008c6adcb5c59bca2abdf7a
parent 2e3e23fd
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -129,11 +129,6 @@ class StopwatchNotificationBuilderN implements StopwatchModel.NotificationBuilde
            content.setViewVisibility(R.id.state, VISIBLE);
        }

        // Swipe away will reset the stopwatch without bringing forward the app.
        final Intent reset = new Intent(context, StopwatchService.class)
                .setAction(HandleDeskClockApiCalls.ACTION_RESET_STOPWATCH)
                .putExtra(HandleDeskClockApiCalls.EXTRA_EVENT_LABEL, eventLabel);

        return new Notification.Builder(context)
                .setLocalOnly(true)
                .setOngoing(running)
@@ -144,7 +139,6 @@ class StopwatchNotificationBuilderN implements StopwatchModel.NotificationBuilde
                .setSmallIcon(R.drawable.stat_notify_stopwatch)
                .setGroup(nm.getStopwatchNotificationGroupKey())
                .setStyle(new Notification.DecoratedCustomViewStyle())
                .setDeleteIntent(Utils.pendingServiceIntent(context, reset))
                .setActions(actions.toArray(new Notification.Action[actions.size()]))
                .setColor(ContextCompat.getColor(context, R.color.default_background))
                .build();
+0 −6
Original line number Diff line number Diff line
@@ -139,11 +139,6 @@ class StopwatchNotificationBuilderPreN implements StopwatchModel.NotificationBui
            expanded.setViewVisibility(R.id.swn_expanded_laps, VISIBLE);
        }

        // Swipe away will reset the stopwatch without bringing forward the app.
        final Intent reset = new Intent(context, StopwatchService.class)
                .setAction(HandleDeskClockApiCalls.ACTION_RESET_STOPWATCH)
                .putExtra(HandleDeskClockApiCalls.EXTRA_EVENT_LABEL, eventLabel);

        final Notification notification = new NotificationCompat.Builder(context)
                .setLocalOnly(true)
                .setOngoing(running)
@@ -151,7 +146,6 @@ class StopwatchNotificationBuilderPreN implements StopwatchModel.NotificationBui
                .setAutoCancel(stopwatch.isPaused())
                .setPriority(NotificationCompat.PRIORITY_MAX)
                .setSmallIcon(R.drawable.stat_notify_stopwatch)
                .setDeleteIntent(Utils.pendingServiceIntent(context, reset))
                .setColor(ContextCompat.getColor(context, R.color.default_background))
                .build();
        notification.bigContentView = expanded;