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

Commit f6d41e1f authored by Sean Stout's avatar Sean Stout Committed by Android (Google) Code Review
Browse files

Merge "Swiping away stopwatch notification does not reset stopwatch." into ub-deskclock-gatling

parents 3ef646d0 7bd3cc47
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;