From 8b0ffd048e39b928d4bdbd964e1a89735c358e80 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Wed, 24 Feb 2016 13:02:33 +0100 Subject: Fixed merge issue for resolving FS#47 (preferences involved in the decision for auto downloading image links moved to global Utility Class) --- .../conversations/services/AbstractConnectionManager.java | 10 ---------- .../eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 2 +- 2 files changed, 1 insertion(+), 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(); -- cgit v1.2.3