diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index feee947001..d6a3e93b66 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -26,6 +26,7 @@ import android.database.Cursor; import android.media.AudioManager; import android.media.MediaPlayer; import android.net.Uri; +import android.os.AsyncTask; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Spannable; @@ -416,10 +417,17 @@ public class MessageNotifier { public static final String REMINDER_ACTION = "org.thoughtcrime.securesms.MessageNotifier.REMINDER_ACTION"; @Override - public void onReceive(Context context, Intent intent) { - MasterSecret masterSecret = KeyCachingService.getMasterSecret(context); - int reminderCount = intent.getIntExtra("reminder_count", 0); - MessageNotifier.updateNotification(context, masterSecret, true, true, reminderCount + 1); + public void onReceive(final Context context, final Intent intent) { + new AsyncTask() { + @Override + protected Void doInBackground(Void... params) { + MasterSecret masterSecret = KeyCachingService.getMasterSecret(context); + int reminderCount = intent.getIntExtra("reminder_count", 0); + MessageNotifier.updateNotification(context, masterSecret, true, true, reminderCount + 1); + + return null; + } + }.execute(); } }