diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-02-24 13:02:33 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-02-24 13:02:33 +0100 |
commit | 8b0ffd048e39b928d4bdbd964e1a89735c358e80 (patch) | |
tree | 86bb4358f1997225047ed4abb709eeab17d90009 /src/main/java | |
parent | 7d95bb60384101997e9a9480436edd9554d83429 (diff) |
Fixed merge issue for resolving FS#47 (preferences involved in the decision for auto downloading image links moved to global Utility Class)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java | 10 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java index 8d02f975..7728c38a 100644 --- a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java @@ -44,16 +44,6 @@ public class AbstractConnectionManager { return this.mXmppConnectionService; } - public long getAutoAcceptFileSize() { - String config = this.mXmppConnectionService.getPreferences().getString( - "auto_accept_file_size", "524288"); - try { - return Long.parseLong(config); - } catch (NumberFormatException e) { - return 524288; - } - } - public boolean hasStoragePermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { return mXmppConnectionService.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; 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 e92acce4..052f59c6 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -366,7 +366,7 @@ public class JingleConnection implements Transferable { conversation.add(message); mXmppConnectionService.updateConversationUi(); if (mJingleConnectionManager.hasStoragePermission() - && size < this.mJingleConnectionManager.getAutoAcceptFileSize()) { + && size < ConversationsPlusPreferences.autoAcceptFileSize()) { Logging.d(Config.LOGTAG, "auto accepting file from "+ packet.getFrom()); this.acceptedAutomatically = true; this.sendAccept(); |