diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-27 12:15:25 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-27 23:17:10 +0200 |
commit | 5544f1f7120eacf22ee13c1348592cc52ddbe8c6 (patch) | |
tree | 91603c1cee5e4fc9ff917d467c650aedad472f93 /src/main/java | |
parent | 1dfdee1a93cbf8ea979750b00486c55cf5a61a0f (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.java | 7 |
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 |