Fix crash when clicking on image in chat in some cases
This commit is contained in:
parent
72e5d51224
commit
8f7fa235a1
2 changed files with 6 additions and 2 deletions
|
@ -407,7 +407,11 @@ public class ChatEventsAdapter extends ListSelectionAdapter implements ChatMessa
|
||||||
contentUri = Uri.parse(path);
|
contentUri = Uri.parse(path);
|
||||||
} else {
|
} else {
|
||||||
file = new File(path);
|
file = new File(path);
|
||||||
contentUri = FileProvider.getUriForFile(mContext, "org.linphone.provider", file);
|
try {
|
||||||
|
contentUri = FileProvider.getUriForFile(mContext, "org.linphone.provider", file);
|
||||||
|
} catch (Exception e) {
|
||||||
|
contentUri = Uri.parse(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String type = null;
|
String type = null;
|
||||||
String extension = MimeTypeMap.getFileExtensionFromUrl(contentUri.toString());
|
String extension = MimeTypeMap.getFileExtensionFromUrl(contentUri.toString());
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b5b6ef454533557a5df6667c26643d0be9d9140a
|
Subproject commit d0da718ac4e154a59fd3e8f595881767f006e826
|
Loading…
Reference in a new issue