mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Fix occasional crash on Android 7 direct reply
Fixes #6185 Closes #6322 //FREEBIE
This commit is contained in:
parent
defb173ffe
commit
2c1a5aef1c
@ -60,7 +60,6 @@ public class RemoteReplyReceiver extends MasterSecretBroadcastReceiver {
|
|||||||
|
|
||||||
final long[] recipientIds = intent.getLongArrayExtra(RECIPIENT_IDS_EXTRA);
|
final long[] recipientIds = intent.getLongArrayExtra(RECIPIENT_IDS_EXTRA);
|
||||||
final CharSequence responseText = remoteInput.getCharSequence(MessageNotifier.EXTRA_REMOTE_REPLY);
|
final CharSequence responseText = remoteInput.getCharSequence(MessageNotifier.EXTRA_REMOTE_REPLY);
|
||||||
final Recipients recipients = RecipientFactory.getRecipientsForIds(context, recipientIds, false);
|
|
||||||
|
|
||||||
if (masterSecret != null && responseText != null) {
|
if (masterSecret != null && responseText != null) {
|
||||||
new AsyncTask<Void, Void, Void>() {
|
new AsyncTask<Void, Void, Void>() {
|
||||||
@ -72,6 +71,7 @@ public class RemoteReplyReceiver extends MasterSecretBroadcastReceiver {
|
|||||||
int subscriptionId = preferences.isPresent() ? preferences.get().getDefaultSubscriptionId().or(-1) : -1;
|
int subscriptionId = preferences.isPresent() ? preferences.get().getDefaultSubscriptionId().or(-1) : -1;
|
||||||
long expiresIn = preferences.isPresent() ? preferences.get().getExpireMessages() * 1000 : 0;
|
long expiresIn = preferences.isPresent() ? preferences.get().getExpireMessages() * 1000 : 0;
|
||||||
|
|
||||||
|
Recipients recipients = RecipientFactory.getRecipientsForIds(context, recipientIds, false);
|
||||||
if (recipients.isGroupRecipient()) {
|
if (recipients.isGroupRecipient()) {
|
||||||
OutgoingMediaMessage reply = new OutgoingMediaMessage(recipients, responseText.toString(), new LinkedList<Attachment>(), System.currentTimeMillis(), subscriptionId, expiresIn, 0);
|
OutgoingMediaMessage reply = new OutgoingMediaMessage(recipients, responseText.toString(), new LinkedList<Attachment>(), System.currentTimeMillis(), subscriptionId, expiresIn, 0);
|
||||||
threadId = MessageSender.send(context, masterSecret, reply, -1, false);
|
threadId = MessageSender.send(context, masterSecret, reply, -1, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user