aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/services
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-10-23 22:20:54 +0200
committersteckbrief <steckbrief@chefmail.de>2015-10-23 22:20:54 +0200
commit7aed735df28984e76486f23d17d02981b268930e (patch)
treeff419b6ac84ff52bf58b8a45b3f1dafc7b0673bf /src/main/java/de/thedevstack/conversationsplus/services
parent57cfcefd527195b67b3d96cde921f0f598690946 (diff)
Fixes FS#47: WiFi only setting in unencrypted chats bug fixed, typo in values for the setting fixed, preferences involved in the decision for auto downloading image links moved to global Utility Class
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/AbstractConnectionManager.java4
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java5
2 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/AbstractConnectionManager.java b/src/main/java/de/thedevstack/conversationsplus/services/AbstractConnectionManager.java
index 00c78348..6936c635 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/AbstractConnectionManager.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/AbstractConnectionManager.java
@@ -12,8 +12,4 @@ public class AbstractConnectionManager {
public XmppConnectionService getXmppConnectionService() {
return this.mXmppConnectionService;
}
-
- public long getAutoAcceptFileSize() {
- return ConversationsPlusPreferences.autoAcceptFileSize();
- }
}
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
index 212bc76a..25d6a389 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java
@@ -47,6 +47,7 @@ import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import de.duenndns.ssl.MemorizingTrustManager;
+import de.thedevstack.conversationsplus.ConversationsPlusApplication;
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.tzur.conversations.Settings;
import de.thedevstack.conversationsplus.Config;
@@ -578,7 +579,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
* check whether we are allowed to download at the moment
*/
public boolean isDownloadAllowedInConnection() {
- if (Settings.DOWNLOAD_ONLY_WLAN) {
+ if (ConversationsPlusPreferences.autoDownloadFileWLAN()) {
return isWifiConnected();
}
return true;
@@ -588,7 +589,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
* check whether wifi is connected
*/
public boolean isWifiConnected() {
- ConnectivityManager cm = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
+ ConnectivityManager cm = (ConnectivityManager) ConversationsPlusApplication.getInstance().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo niWifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
return niWifi.isConnected();
}