From 1d51c8792d74866b0bdab8bd753381cf71414fd7 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sat, 4 Apr 2015 17:09:38 -0700 Subject: [PATCH] Do not disconnect the devices when refreshing the listeners This caused the devices to flicker in the main activity --- .../kdeconnect/Backends/LanBackend/LanLinkProvider.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java index fa2e869c..ae269583 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java @@ -361,10 +361,18 @@ public class LanLinkProvider extends BaseLinkProvider { @Override public void onNetworkChange() { //Log.e("KDE/LanLinkProvider","onNetworkChange"); + //FilesHelper.LogOpenFileCount(); + + //Keep existing connections open while unbinding the socket + tcpAcceptor.setCloseOnDeactivation(false); onStop(); + tcpAcceptor.setCloseOnDeactivation(true); + //FilesHelper.LogOpenFileCount(); + onStart(); + //FilesHelper.LogOpenFileCount(); }