aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-06 18:23:59 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-07 13:24:41 +0100
commitc3e8fb3446237dee34bf49436076a10d07e2efdf (patch)
tree881bf04d964be1ebe99e1a4a0aafc5de53c46726 /src/main/java/eu/siacs/conversations/xmpp
parent739a2d609d15be7472575adb937e9a0b164dd4a9 (diff)
request storage permission when needed on Android 6.0
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index 59b660c8c..56582f974 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -361,7 +361,8 @@ public class JingleConnection implements Transferable {
message.setBody(Long.toString(size));
conversation.add(message);
mXmppConnectionService.updateConversationUi();
- if (size < this.mJingleConnectionManager.getAutoAcceptFileSize()) {
+ if (mJingleConnectionManager.hasStoragePermission()
+ && size < this.mJingleConnectionManager.getAutoAcceptFileSize()) {
Log.d(Config.LOGTAG, "auto accepting file from "+ packet.getFrom());
this.acceptedAutomatically = true;
this.sendAccept();