From f8ea92352282c3392fd6acc61c6889a0ee6d87a5 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 25 Jun 2015 18:27:50 +0200 Subject: [PATCH] Remove double synchronization --- .../k9/controller/MessagingController.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java b/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java index 96e162727..79d4cbcdf 100644 --- a/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -1810,18 +1810,16 @@ public class MessagingController implements Runnable { synchronized (data) { MessageReference ref = localMessage.makeMessageReference(); if (data.removeMatchingMessage(context, ref)) { - synchronized (data) { - // if we remove a single message from the notification, - // maybe there is a stacked notification active for that one message - Integer childNotification = data.getStackedChildNotification(ref); - if (childNotification != null) { - NotificationManager notificationManager = - (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.cancel(childNotification); - } - // update the (summary-) notification - notifyAccountWithDataLocked(context, account, null, data); + // if we remove a single message from the notification, + // maybe there is a stacked notification active for that one message + Integer childNotification = data.getStackedChildNotification(ref); + if (childNotification != null) { + NotificationManager notificationManager = + (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.cancel(childNotification); } + // update the (summary-) notification + notifyAccountWithDataLocked(context, account, null, data); } } }