diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-10-23 22:26:55 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-10-23 22:26:55 +0200 |
commit | 389e3d4f0f5116f5ea22cc7c5e8cec1e6c791e3a (patch) | |
tree | de9aad5a69444199fccef87f81709bde5a7689b3 /src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | bdc211a67a25298eb05854ff7e98461223e21bc5 (diff) | |
parent | 7aed735df28984e76486f23d17d02981b268930e (diff) |
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index e9b6b133..cd82dce1 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/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 eu.siacs.conversations.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(); } |