catch illegalargument exception when discovering extension from url
This commit is contained in:
parent
effe52981a
commit
f533e526fb
|
@ -534,7 +534,12 @@ public class FileBackend {
|
||||||
private String getExtensionFromUri(Uri uri) {
|
private String getExtensionFromUri(Uri uri) {
|
||||||
String[] projection = {MediaStore.MediaColumns.DATA};
|
String[] projection = {MediaStore.MediaColumns.DATA};
|
||||||
String filename = null;
|
String filename = null;
|
||||||
Cursor cursor = mXmppConnectionService.getContentResolver().query(uri, projection, null, null, null);
|
Cursor cursor;
|
||||||
|
try {
|
||||||
|
cursor = mXmppConnectionService.getContentResolver().query(uri, projection, null, null, null);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
cursor = null;
|
||||||
|
}
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
try {
|
try {
|
||||||
if (cursor.moveToFirst()) {
|
if (cursor.moveToFirst()) {
|
||||||
|
|
Loading…
Reference in New Issue