Fix crash when clicking on image in chat in some cases

This commit is contained in:
Sylvain Berfini 2018-02-14 14:55:49 +01:00
parent 72e5d51224
commit 8f7fa235a1
2 changed files with 6 additions and 2 deletions

View file

@ -407,7 +407,11 @@ public class ChatEventsAdapter extends ListSelectionAdapter implements ChatMessa
contentUri = Uri.parse(path);
} else {
file = new File(path);
try {
contentUri = FileProvider.getUriForFile(mContext, "org.linphone.provider", file);
} catch (Exception e) {
contentUri = Uri.parse(path);
}
}
String type = null;
String extension = MimeTypeMap.getFileExtensionFromUrl(contentUri.toString());

@ -1 +1 @@
Subproject commit b5b6ef454533557a5df6667c26643d0be9d9140a
Subproject commit d0da718ac4e154a59fd3e8f595881767f006e826