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");
|
||||
File file = new File(pathBuilder.toString());
|
||||
file.getParentFile().mkdirs();
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue