aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-27 12:15:25 +0200
committerChristian Schneppe <christian@pix-art.de>2016-08-27 23:17:10 +0200
commit5544f1f7120eacf22ee13c1348592cc52ddbe8c6 (patch)
tree91603c1cee5e4fc9ff917d467c650aedad472f93 /src/main/java
parent1dfdee1a93cbf8ea979750b00486c55cf5a61a0f (diff)
bring back connectivity changed events on android n
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index d49d1f68b..44aa13177 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -852,13 +852,14 @@ 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();
}
-
//start export log service every day at given time
ScheduleAutomaticExport();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ registerReceiver(this.mEventReceiver,new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
+ }
}
@Override