Ensure uris is empty before onStart adds to it

Fixes #1382
This commit is contained in:
Andreas Straub 2015-09-02 21:57:52 +02:00
parent fc594e249a
commit b265341848

View file

@ -131,6 +131,7 @@ public class ShareWithActivity extends XmppActivity {
if (Intent.ACTION_SEND.equals(intent.getAction())) { if (Intent.ACTION_SEND.equals(intent.getAction())) {
final Uri uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM); final Uri uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
if (type != null && uri != null && !type.equalsIgnoreCase("text/plain")) { if (type != null && uri != null && !type.equalsIgnoreCase("text/plain")) {
this.share.uris.clear();
this.share.uris.add(uri); this.share.uris.add(uri);
this.share.image = type.startsWith("image/") || isImage(uri); this.share.image = type.startsWith("image/") || isImage(uri);
} else { } else {