prefer attachment in share intent if there is one
This commit is contained in:
parent
803334e42b
commit
719b35e431
|
@ -131,10 +131,11 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
|
||||||
if (Intent.ACTION_SEND.equals(action)) {
|
if (Intent.ACTION_SEND.equals(action)) {
|
||||||
final String text = intent.getStringExtra(Intent.EXTRA_TEXT);
|
final String text = intent.getStringExtra(Intent.EXTRA_TEXT);
|
||||||
final Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
final Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
|
|
||||||
if (data != null && "geo".equals(data.getScheme())) {
|
if (data != null && "geo".equals(data.getScheme())) {
|
||||||
this.share.uris.clear();
|
this.share.uris.clear();
|
||||||
this.share.uris.add(data);
|
this.share.uris.add(data);
|
||||||
} else if (type != null && uri != null && (text == null || !type.equals("text/plain"))) {
|
} else if (type != null && uri != null) {
|
||||||
this.share.uris.clear();
|
this.share.uris.clear();
|
||||||
this.share.uris.add(uri);
|
this.share.uris.add(uri);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue