From 011bdd8ef63c23f1a91f15221c33544089d781b7 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 5 Aug 2019 21:32:20 +0200 Subject: [PATCH] fixed send_multiple share intent with empty extras. fixes #3512 --- .../java/eu/siacs/conversations/ui/ShareWithActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java index ce64af856..83b0bebcc 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java @@ -12,6 +12,7 @@ import android.view.MenuItem; import android.widget.Toast; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import eu.siacs.conversations.Config; @@ -142,7 +143,8 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer this.share.text = text; } } else if (Intent.ACTION_SEND_MULTIPLE.equals(action)) { - this.share.uris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM); + final ArrayList uris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM); + this.share.uris = uris == null ? new ArrayList<>() : uris; } if (xmppConnectionServiceBound) { xmppConnectionService.populateWithOrderedConversations(mConversations, this.share.uris.size() == 0, false);