Prevent reply and mark as read abilities while Signal is locked.

Fixes #8874
This commit is contained in:
Alan Evans 2019-06-17 10:39:41 -04:00 committed by Greyson Parrelli
parent 1e0b0d926a
commit 284cca3e25

View File

@ -320,6 +320,7 @@ public class MessageNotifier {
long timestamp = notifications.get(0).getTimestamp();
if (timestamp != 0) builder.setWhen(timestamp);
if (!KeyCachingService.isLocked(context)) {
ReplyMethod replyMethod = ReplyMethod.forRecipient(context, recipient);
builder.addActions(notificationState.getMarkAsReadIntent(context, notificationId),
@ -329,6 +330,7 @@ public class MessageNotifier {
builder.addAndroidAutoAction(notificationState.getAndroidAutoReplyIntent(context, notifications.get(0).getRecipient()),
notificationState.getAndroidAutoHeardIntent(context, notificationId), notifications.get(0).getTimestamp());
}
ListIterator<NotificationItem> iterator = notifications.listIterator(notifications.size());