check for rare null pointer platform bug in share intent handling
This commit is contained in:
parent
2a139a4b47
commit
cf909afc60
|
@ -1268,10 +1268,12 @@ public class ConversationActivity extends XmppActivity
|
||||||
}
|
}
|
||||||
Uri uri = intent.getData();
|
Uri uri = intent.getData();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && uri == null) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && uri == null) {
|
||||||
ClipData clipData = intent.getClipData();
|
final ClipData clipData = intent.getClipData();
|
||||||
|
if (clipData != null) {
|
||||||
for (int i = 0; i < clipData.getItemCount(); ++i) {
|
for (int i = 0; i < clipData.getItemCount(); ++i) {
|
||||||
uris.add(clipData.getItemAt(i).getUri());
|
uris.add(clipData.getItemAt(i).getUri());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uris.add(uri);
|
uris.add(uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue