mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Decrypt and process messages all in one transaction.
Giddy up
This commit is contained in:
@@ -277,15 +277,11 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
||||
|
||||
boolean isReminder = reminderCount > 0;
|
||||
Cursor telcoCursor = null;
|
||||
Cursor pushCursor = null;
|
||||
|
||||
try {
|
||||
telcoCursor = DatabaseFactory.getMmsSmsDatabase(context).getUnread();
|
||||
pushCursor = DatabaseFactory.getPushDatabase(context).getPending();
|
||||
|
||||
if ((telcoCursor == null || telcoCursor.isAfterLast()) &&
|
||||
(pushCursor == null || pushCursor.isAfterLast()))
|
||||
{
|
||||
if (telcoCursor == null || telcoCursor.isAfterLast()) {
|
||||
NotificationCancellationHelper.cancelAllMessageNotifications(context);
|
||||
updateBadge(context, 0);
|
||||
clearReminder(context);
|
||||
@@ -347,7 +343,6 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
||||
}
|
||||
} finally {
|
||||
if (telcoCursor != null) telcoCursor.close();
|
||||
if (pushCursor != null) pushCursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user