aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-10-23 09:03:36 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-10-23 09:03:36 +0200
commita4020e85f627f9af2142213a4c34cb4efaa8ac9a (patch)
tree1fbfb6abe7efa8c72e2574501865eedfc12c1249 /src
parent8c1bb058daddca297290e5bbfee8885865ae343b (diff)
use file provider on android M as well
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/FileBackend.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
index bc919788..1136ce93 100644
--- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
@@ -440,7 +440,7 @@ public class FileBackend {
public Uri getTakePhotoUri() {
File file = new File(getTakePhotoPath()+"IMG_" + this.IMAGE_DATE_FORMAT.format(new Date()) + ".jpg");
file.getParentFile().mkdirs();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return FileProvider.getUriForFile(mXmppConnectionService, CONVERSATIONS_FILE_PROVIDER, file);
} else {
return Uri.fromFile(file);
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index c04cb1a5..afb2728e 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -703,7 +703,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
mime = "*/*";
}
Uri uri;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
try {
uri = FileProvider.getUriForFile(activity, FileBackend.CONVERSATIONS_FILE_PROVIDER, file);
} catch (IllegalArgumentException e) {