aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-05-14 20:27:30 +0200
committerChristian Schneppe <christian@pix-art.de>2018-05-14 20:57:09 +0200
commit5331de074f67a1e7c17564e41fb79a86df8bce7f (patch)
tree3f2053d0e1c72ed018741f36778657a82b91931a
parent870bace0890b0bec5e1b990f6ed1e0f2a386d383 (diff)
check permissions for locations
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index a7163af5d..4e4ae8ee9 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1525,6 +1525,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
if (!hasPermissions(attachmentChoice, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA)) {
return;
}
+ } else if (attachmentChoice == ATTACHMENT_CHOICE_LOCATION) {
+ if (!hasPermissions(attachmentChoice, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION)) {
+ return;
+ }
} else if (attachmentChoice != ATTACHMENT_CHOICE_LOCATION) {
if (!hasPermissions(attachmentChoice, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
return;