mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
don't use file provider for photo uris on android < N. fixes #2030
This commit is contained in:
parent
401759cdc7
commit
13ed27f91e
@ -440,7 +440,11 @@ public class FileBackend {
|
|||||||
pathBuilder.append("IMG_" + this.imageDateFormat.format(new Date()) + ".jpg");
|
pathBuilder.append("IMG_" + this.imageDateFormat.format(new Date()) + ".jpg");
|
||||||
File file = new File(pathBuilder.toString());
|
File file = new File(pathBuilder.toString());
|
||||||
file.getParentFile().mkdirs();
|
file.getParentFile().mkdirs();
|
||||||
return FileProvider.getUriForFile(mXmppConnectionService,"eu.siacs.conversations.files",file);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
return FileProvider.getUriForFile(mXmppConnectionService, "eu.siacs.conversations.files", file);
|
||||||
|
} else {
|
||||||
|
return Uri.fromFile(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Avatar getPepAvatar(Uri image, int size, Bitmap.CompressFormat format) {
|
public Avatar getPepAvatar(Uri image, int size, Bitmap.CompressFormat format) {
|
||||||
|
Loading…
Reference in New Issue
Block a user