aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-27 12:15:25 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-08-27 12:15:25 +0200
commit3d5940cb76932787a5a8f9410abaa04123a03efb (patch)
tree19fc9cf9a6cd4c9f5bb24b0a1f3d8f54aae4c4ea /src/main/java/eu
parent78e962ce67b1e3cdd2f2ee376e85e7b1a9e5a2cd (diff)
bring back connectivity changed events on android n
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
1 files changed, 4 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 9d2796e1..96965d03 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -854,10 +854,12 @@ public class XmppConnectionService extends Service {
toggleForegroundService();
updateUnreadCountBadge();
toggleScreenEventReceiver();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
- && !Config.PUSH_MODE) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Config.PUSH_MODE) {
scheduleNextIdlePing();
}
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ registerReceiver(this.mEventReceiver,new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
+ }
}
@Override